Make _get and _add function inline instead of defines
This commit is contained in:
@@ -177,8 +177,10 @@ int uc_thread_queue_tryadd(struct uc_threadqueue *queue, const struct timespec *
|
|||||||
* Like uc_thread_queue_add but will wait indefintly.
|
* Like uc_thread_queue_add but will wait indefintly.
|
||||||
* @see uc_thread_queue_add
|
* @see uc_thread_queue_add
|
||||||
*/
|
*/
|
||||||
#define uc_thread_queue_add(queue, msg)\
|
static inline int uc_thread_queue_add(struct uc_threadqueue *queue, struct uc_threadmsg *msg)
|
||||||
uc_thread_queue_tryadd(queue, NULL, msg)
|
{
|
||||||
|
return uc_thread_queue_tryadd(queue, NULL, msg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a message from a queue
|
* Gets a message from a queue
|
||||||
@@ -209,8 +211,10 @@ int uc_thread_queue_tryget(struct uc_threadqueue *queue, const struct timespec *
|
|||||||
* to become available
|
* to become available
|
||||||
* @see uc_thread_queue_tryget
|
* @see uc_thread_queue_tryget
|
||||||
*/
|
*/
|
||||||
#define uc_thread_queue_get(queue, msg)\
|
static inline int uc_thread_queue_get(struct uc_threadqueue *queue, struct uc_threadmsg **msg)
|
||||||
uc_thread_queue_tryget(queue, NULL, msg)
|
{
|
||||||
|
return uc_thread_queue_tryget(queue, NULL, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user