Re: kevent/select-like mechanism for use with the socket KPI?
Re: kevent/select-like mechanism for use with the socket KPI?
- Subject: Re: kevent/select-like mechanism for use with the socket KPI?
- From: Josh Graessley <email@hidden>
- Date: Sat, 09 Jun 2007 01:20:03 -0700
One trick is to specify an upcall function. Your thread calls msleep
and waits for an event. Your upcall just takes the mutex, indicates
which socket had an event occur and then calls wakeup. Your thread
will unblock. The devil is in the details.
-josh (mobile)
On Jun 9, 2007, at 12:54 AM, email@hidden wrote:
Is there a way to do something like kevent/select in the kernel with
the socket KPI where I can wait on multiple socket_t's? Alernatively,
is there a way to cancel a blocking socket KPI call?
I wanted to use the socket KPI in a blocking manner, but still be able
to cancel a blocking send, recv, connect, etc. call via a request
coming from user space. From user space this is easy because I can
write to a pipe that's also added to the kqueue to wake it up, but I
wasn't sure how to do this with the socket KPI in the kernel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden