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

Method KqueueAdd

adapter/micro_thread/kqueue_proxy.cpp:116–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116bool KqueueProxy::KqueueAdd(KqObjList& obj_list)
117{
118 bool ret = true;
119 KqueuerObj *kqobj = NULL;
120 KqueuerObj *kqobj_error = NULL;
121 TAILQ_FOREACH(kqobj, &obj_list, _entry)
122 {
123 if (!KqueueAddObj(kqobj))
124 {
125 MTLOG_ERROR("kqobj add failed, fd: %d", kqobj->GetOsfd());
126 kqueue_assert(0);
127 kqobj_error = kqobj;
128 ret = false;
129 goto EXIT_LABEL;
130 }
131 }
132
133EXIT_LABEL:
134
135 if (!ret)
136 {
137 TAILQ_FOREACH(kqobj, &obj_list, _entry)
138 {
139 if (kqobj == kqobj_error)
140 {
141 break;
142 }
143 KqueueDelObj(kqobj);
144 }
145 }
146
147 return ret;
148}
149
150bool KqueueProxy::KqueueDel(KqObjList& obj_list)
151{

Callers 1

KqueueScheduleMethod · 0.80

Calls 1

GetOsfdMethod · 0.80

Tested by

no test coverage detected