spinlockacquire.cc

来自「Click is a modular router toolkit. To us」· CC 代码 · 共 35 行

CC
35
字号
/* * spinlockacquire.{cc,hh} -- element acquires spinlock * Benjie Chen, Eddie Kohler * * Copyright (c) 1999-2000 Massachusetts Institute of Technology. * Copyright (c) 2008 Meraki, Inc. * * This software is being provided by the copyright holders under the GNU * General Public License, either version 2 or, at your discretion, any later * version. For more information, see the `COPYRIGHT' file in the source * distribution. */#include <click/config.h>#include <click/router.hh>#include <click/confparse.hh>#include <click/error.hh>#include <click/nameinfo.hh>#include "spinlockacquire.hh"CLICK_DECLSintSpinlockAcquire::configure(Vector<String> &conf, ErrorHandler *errh){    String name;    if (cp_va_kparse(conf, this, errh, "LOCK", cpkP+cpkM, cpString, &name, cpEnd)<0)	return -1;    if (!NameInfo::query(NameInfo::T_SPINLOCK, this, name, &_lock, sizeof(Spinlock *)))	return errh->error("cannot locate spinlock %s", name.c_str());    return 0;}CLICK_ENDDECLSEXPORT_ELEMENT(SpinlockAcquire)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?