| 338 | } |
| 339 | |
| 340 | bool KqueueProxy::KqueueDelObj(KqueuerObj* obj) |
| 341 | { |
| 342 | if (obj == NULL) |
| 343 | { |
| 344 | MTLOG_ERROR("kqobj input invalid, %p", obj); |
| 345 | return false; |
| 346 | } |
| 347 | KqFdRef* item = KqFdRefGet(obj->GetOsfd()); |
| 348 | if (item == NULL) |
| 349 | { |
| 350 | MT_ATTR_API(320851, 1); // fd error |
| 351 | MTLOG_ERROR("kqfd ref not find, failed, fd: %d", obj->GetOsfd()); |
| 352 | kqueue_assert(0); |
| 353 | return false; |
| 354 | } |
| 355 | |
| 356 | int ret = obj->KqueueCtlDel(item); |
| 357 | if (ret < 0) { |
| 358 | MTLOG_ERROR("kqueue ctrl callback failed, fd: %d, obj: %p", obj->GetOsfd(), obj); |
| 359 | kqueue_assert(0); |
| 360 | return false; |
| 361 | } |
| 362 | |
| 363 | return true; |
| 364 | } |
| 365 | |
| 366 | void KqueueProxy::KqueueRcvEventList(int evtfdnum) |
| 367 | { |
no test coverage detected