MCPcopy Create free account
hub / github.com/F-Stack/f-stack / KqueueCtlDel

Method KqueueCtlDel

adapter/micro_thread/mt_notify.cpp:271–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271int UdpSessionNtfy::KqueueCtlDel(void* args)
272{
273 MtFrame* frame = MtFrame::Instance();
274 KqFdRef* fd_ref = (KqFdRef*)args;
275 //ASSERT(fd_ref != NULL);
276
277 int osfd = this->GetOsfd();
278
279 KqueuerObj* old_obj = fd_ref->GetNotifyObj();
280 if (old_obj != this)
281 {
282 MTLOG_ERROR("epfd ref conflict, fd: %d, old: %p, now: %p", osfd, old_obj, this);
283 return -1;
284 }
285
286 if (!frame->KqueueCtrlDel(osfd, KQ_EVENT_WRITE))
287 {
288 MTLOG_ERROR("epfd ref del failed, log");
289 return -2;
290 }
291 this->DisableOutput();
292
293 return 0;
294
295}
296
297int TcpKeepNtfy::InputNotify()
298{

Callers

nothing calls this directly

Calls 4

GetOsfdMethod · 0.80
GetNotifyObjMethod · 0.80
KqueueCtrlDelMethod · 0.80
DisableOutputMethod · 0.80

Tested by

no test coverage detected