logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

q_push - push a job onto a smolq queue

Description

q_push() pushes f onto the queue q with argument arg.q_trypush()  is the same as q_push() except that if the queue writer lock cannot be immediately obtained,
       then the call returns an error (errno set to EAGAIN) instead of blocking.

Errors

EAGAIN ( q_trypush()) The operation could not be performed without blocking. (i.e., the queue was full).

       The function can also fail with the errors for sem_post(3) or sem_wait(3).

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       q_push - push a job onto a smolq queue

Return Value

       The q_push() function returns zero on success. On error, -1 is returned and errno is set to indicate  the
       error.

See Also

q_job_seek(3),   q_pool_create(3),   q_pool_destroy(3),  q_init(3),  q_free(3),  q_wait(3),  sem_post(3),
       sem_wait(3)

LIBRECAST                                          2023-07-25                                          Q_PUSH(3)

Synopsis

#include<librecast/q.h>intq_push(q_t*q,void*(*f)(void*),void*restrictarg);intq_trypush(q_t*q,void*(*f)(void*),void*restrictarg);

       Compile and link with -llibrecast.

See Also