Re-format code to avoid overly long lines and declarations
This commit is contained in:
@@ -174,13 +174,16 @@ int uc_thread_queue_init(struct uc_threadqueue *queue, unsigned int max_elements
|
||||
* @return 0 on succes ENOMEM if out of memory EINVAL if queue is NULL, ETIMEDOUT if timeout occured or other
|
||||
* errno values if pthread functions failed.
|
||||
*/
|
||||
int uc_thread_queue_tryadd(struct uc_threadqueue *queue, const struct timespec *timeout, struct uc_threadmsg *msg);
|
||||
int uc_thread_queue_tryadd(struct uc_threadqueue *queue,
|
||||
const struct timespec *timeout,
|
||||
struct uc_threadmsg *msg);
|
||||
|
||||
/**
|
||||
* Like uc_thread_queue_add but will wait indefintly.
|
||||
* @see uc_thread_queue_add
|
||||
*/
|
||||
static inline int uc_thread_queue_add(struct uc_threadqueue *queue, struct uc_threadmsg *msg)
|
||||
static inline int uc_thread_queue_add(struct uc_threadqueue *queue,
|
||||
struct uc_threadmsg *msg)
|
||||
{
|
||||
return uc_thread_queue_tryadd(queue, NULL, msg);
|
||||
}
|
||||
@@ -207,14 +210,17 @@ static inline int uc_thread_queue_add(struct uc_threadqueue *queue, struct uc_th
|
||||
*
|
||||
* @return 0 on success EINVAL if queue is NULL ETIMEDOUT if timeout occurs
|
||||
*/
|
||||
int uc_thread_queue_tryget(struct uc_threadqueue *queue, const struct timespec *timeout, struct uc_threadmsg **msg);
|
||||
int uc_thread_queue_tryget(struct uc_threadqueue *queue,
|
||||
const struct timespec *timeout,
|
||||
struct uc_threadmsg **msg);
|
||||
|
||||
/**
|
||||
* Like uc_thread_queue_tryget, but will wait indefintly for an item
|
||||
* to become available
|
||||
* @see uc_thread_queue_tryget
|
||||
*/
|
||||
static inline int uc_thread_queue_get(struct uc_threadqueue *queue, struct uc_threadmsg **msg)
|
||||
static inline int uc_thread_queue_get(struct uc_threadqueue *queue,
|
||||
struct uc_threadmsg **msg)
|
||||
{
|
||||
return uc_thread_queue_tryget(queue, NULL, msg);
|
||||
}
|
||||
@@ -246,7 +252,9 @@ unsigned int uc_thread_queue_length( struct uc_threadqueue *queue );
|
||||
* @param cookie pointer passed back to the uc_thread_queue_walk_func
|
||||
* @return 0 on success EINVAL if queue is NULL EBUSY if someone is holding any locks on the queue
|
||||
*/
|
||||
int uc_thread_queue_destroy(struct uc_threadqueue *queue, uc_thread_queue_walk_func free_func, void *cookie);
|
||||
int uc_thread_queue_destroy(struct uc_threadqueue *queue,
|
||||
uc_thread_queue_walk_func free_func,
|
||||
void *cookie);
|
||||
|
||||
/**
|
||||
* Walk the elements of the queue, intended for debugging
|
||||
@@ -261,7 +269,9 @@ int uc_thread_queue_destroy(struct uc_threadqueue *queue, uc_thread_queue_walk_f
|
||||
* The function must not in anyway interact with the queue.
|
||||
* @return 0 on success
|
||||
*/
|
||||
int uc_thread_queue_walk(struct uc_threadqueue *queue, uc_thread_queue_walk_func walk_func, void *cookie);
|
||||
int uc_thread_queue_walk(struct uc_threadqueue *queue,
|
||||
uc_thread_queue_walk_func walk_func,
|
||||
void *cookie);
|
||||
|
||||
|
||||
/**
|
||||
@@ -275,7 +285,9 @@ int uc_thread_queue_walk(struct uc_threadqueue *queue, uc_thread_queue_walk_func
|
||||
* @param cookie pointer passed back to the uc_thread_queue_walk_func
|
||||
* @return 0 on success
|
||||
*/
|
||||
int uc_thread_queue_clear(struct uc_threadqueue *queue, uc_thread_queue_walk_func free_func, void *cookie);
|
||||
int uc_thread_queue_clear(struct uc_threadqueue *queue,
|
||||
uc_thread_queue_walk_func free_func,
|
||||
void *cookie);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user