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_init, q_free - initialize and free queue

Description

       The q_init() function initializes smolq queue q.

       You  will  be  surprised  to  learn  that  q_free()  is  the  corresponding  function  to free a queue so
       initialized.

Errors

q_init() may fail when initializing the queue semaphore.  q_free() may fail  when  destroying  the  queue
       semaphore.  See sem_init(3) and sem_destroy(3) for the relevant error codes.

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       q_init, q_free - initialize and free queue

Return Value

       These functions return 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_push(3), q_wait(3), sem_init(3), sem_destroy(3)

LIBRECAST                                          2023-07-23                                          Q_INIT(3)

Synopsis

#include<librecast/q.h>intq_init(q_t*q);intq_free(q_t*q);

       Compile and link with -llibrecast.

See Also