⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spinlockacquire.cc

📁 COPE the first practical network coding scheme which is developped on click
💻 CC
字号:
/* * spinlockacquire.{cc,hh} -- element acquires spinlock * Benjie Chen * * Copyright (c) 1999-2000 Massachusetts Institute of Technology. * * 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 "spinlockinfo.hh"#include "spinlockacquire.hh"CLICK_DECLSintSpinlockAcquire::configure(Vector<String> &conf, ErrorHandler *errh){  String name;  if (cp_va_parse(conf, this, errh, cpString, "name of spinlock", &name, cpEnd)<0)    return -1;  for (int i = 0; i < router()->nelements(); i++) {    if (SpinlockInfo *si = 	(SpinlockInfo *)(router()->element(i)->cast("SpinlockInfo"))) {      _lock = si->query(name, id());      if (!_lock)        return errh->error("cannot locate spinlock %s",name.cc());      break;    }  }  return 0;}CLICK_ENDDECLSEXPORT_ELEMENT(SpinlockAcquire)

⌨️ 快捷键说明

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