… | |
… | |
2102 | { |
2102 | { |
2103 | sometype data; |
2103 | sometype data; |
2104 | |
2104 | |
2105 | // no locking etc. |
2105 | // no locking etc. |
2106 | queue_put (data); |
2106 | queue_put (data); |
2107 | ev_async_send (DEFAULT_ &mysig); |
2107 | ev_async_send (EV_DEFAULT_ &mysig); |
2108 | } |
2108 | } |
2109 | |
2109 | |
2110 | static void |
2110 | static void |
2111 | mysig_cb (EV_P_ ev_async *w, int revents) |
2111 | mysig_cb (EV_P_ ev_async *w, int revents) |
2112 | { |
2112 | { |
… | |
… | |
2143 | // only need to lock the actual queueing operation |
2143 | // only need to lock the actual queueing operation |
2144 | pthread_mutex_lock (&mymutex); |
2144 | pthread_mutex_lock (&mymutex); |
2145 | queue_put (data); |
2145 | queue_put (data); |
2146 | pthread_mutex_unlock (&mymutex); |
2146 | pthread_mutex_unlock (&mymutex); |
2147 | |
2147 | |
2148 | ev_async_send (DEFAULT_ &mysig); |
2148 | ev_async_send (EV_DEFAULT_ &mysig); |
2149 | } |
2149 | } |
2150 | |
2150 | |
2151 | static void |
2151 | static void |
2152 | mysig_cb (EV_P_ ev_async *w, int revents) |
2152 | mysig_cb (EV_P_ ev_async *w, int revents) |
2153 | { |
2153 | { |