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.
|
||||
* @see uc_thread_queue_add
|
||||
*/
|
||||
#define uc_thread_queue_add(queue, msg)\
|
||||
uc_thread_queue_tryadd(queue, NULL, msg)
|
||||
static inline int uc_thread_queue_add(struct uc_threadqueue *queue, struct uc_threadmsg *msg)
|
||||
{
|
||||
return uc_thread_queue_tryadd(queue, NULL, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @see uc_thread_queue_tryget
|
||||
*/
|
||||
#define uc_thread_queue_get(queue, msg)\
|
||||
uc_thread_queue_tryget(queue, NULL, msg)
|
||||
static inline int uc_thread_queue_get(struct uc_threadqueue *queue, struct uc_threadmsg **msg)
|
||||
{
|
||||
return uc_thread_queue_tryget(queue, NULL, msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user