libcthreads(3)

πŸ“¦ in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay so this is libcthreads(3) from the Library Functions Manual, and the name on the tin is: libcthreads.h β€” Library to support cross-platform C threads functions. Bestie, it’s the cross-platform C threads library page, and we’re gonna go through it together πŸ’…


✨ SYNOPSIS ✨

First thing, the include:

#include <libcthreads.h>

Then the function families, all categorized exactly like the page says. Copy-paste ready, no cap 🫢

πŸ’– Support functions πŸ’–

const char *
libcthreads_get_version(void);

πŸ’– Error functions πŸ’–

void
libcthreads_error_free(libcthreads_error_t **error);

int
libcthreads_error_fprint(libcthreads_error_t *error, FILE *stream);

int
libcthreads_error_sprint(libcthreads_error_t *error, char *string,
    size_t size);

int
libcthreads_error_backtrace_fprint(libcthreads_error_t *error,
    FILE *stream);

int
libcthreads_error_backtrace_sprint(libcthreads_error_t *error,
    char *string, size_t size);

πŸ’– Thread functions πŸ’–

int
libcthreads_thread_create(libcthreads_thread_t **thread,
    const libcthreads_thread_attributes_t *thread_attributes,
    int (*callback_function)( void *arguments ),
    void *callback_function_arguments, libcthreads_error_t **error);

int
libcthreads_thread_join(libcthreads_thread_t **thread,
    libcthreads_error_t **error);

πŸ’– Thread attributes functions πŸ’–

int
libcthreads_thread_attributes_initialize(libcthreads_thread_attributes_t **thread_attributes,
    libcthreads_error_t **error);

int
libcthreads_thread_attributes_free(libcthreads_thread_attributes_t **thread_attributes,
    libcthreads_error_t **error);

πŸ’– Condition functions πŸ’–

int
libcthreads_condition_initialize(libcthreads_condition_t **condition,
    libcthreads_error_t **error);

int
libcthreads_condition_free(libcthreads_condition_t **condition,
    libcthreads_error_t **error);

int
libcthreads_condition_broadcast(libcthreads_condition_t *condition,
    libcthreads_error_t **error);

int
libcthreads_condition_signal(libcthreads_condition_t *condition,
    libcthreads_error_t **error);

int
libcthreads_condition_wait(libcthreads_condition_t *condition,
    libcthreads_mutex_t *mutex, libcthreads_error_t **error);

πŸ’– Lock functions πŸ’–

int
libcthreads_lock_initialize(libcthreads_lock_t **lock,
    libcthreads_error_t **error);

int
libcthreads_lock_free(libcthreads_lock_t **lock,
    libcthreads_error_t **error);

int
libcthreads_lock_grab(libcthreads_lock_t *lock,
    libcthreads_error_t **error);

int
libcthreads_lock_release(libcthreads_lock_t *lock,
    libcthreads_error_t **error);

πŸ’– Mutex functions πŸ’–

int
libcthreads_mutex_initialize(libcthreads_mutex_t **mutex,
    libcthreads_error_t **error);

int
libcthreads_mutex_free(libcthreads_mutex_t **mutex,
    libcthreads_error_t **error);

int
libcthreads_mutex_grab(libcthreads_mutex_t *mutex,
    libcthreads_error_t **error);

int
libcthreads_mutex_try_grab(libcthreads_mutex_t *mutex,
    libcthreads_error_t **error);

int
libcthreads_mutex_release(libcthreads_mutex_t *mutex,
    libcthreads_error_t **error);

πŸ’– Read/Write lock functions πŸ’–

int
libcthreads_read_write_lock_initialize(libcthreads_read_write_lock_t **read_write_lock,
    libcthreads_error_t **error);

int
libcthreads_read_write_lock_free(libcthreads_read_write_lock_t **read_write_lock,
    libcthreads_error_t **error);

int
libcthreads_read_write_lock_grab_for_read(libcthreads_read_write_lock_t *read_write_lock,
    libcthreads_error_t **error);

int
libcthreads_read_write_lock_grab_for_write(libcthreads_read_write_lock_t *read_write_lock,
    libcthreads_error_t **error);

int
libcthreads_read_write_lock_release_for_read(libcthreads_read_write_lock_t *read_write_lock,
    libcthreads_error_t **error);

int
libcthreads_read_write_lock_release_for_write(libcthreads_read_write_lock_t *read_write_lock,
    libcthreads_error_t **error);

πŸ’– Queue functions πŸ’–

int
libcthreads_queue_initialize(libcthreads_queue_t **queue,
    int maximum_number_of_values, libcthreads_error_t **error);

int
libcthreads_queue_free(libcthreads_queue_t **queue,
    int (*value_free_function)( intptr_t **value, libcthreads_error_t **error ),
    libcthreads_error_t **error);

int
libcthreads_queue_empty(libcthreads_queue_t *queue,
    libcthreads_error_t **error);

int
libcthreads_queue_try_pop(libcthreads_queue_t *queue, intptr_t **value,
    libcthreads_error_t **error);

int
libcthreads_queue_pop(libcthreads_queue_t *queue, intptr_t **value,
    libcthreads_error_t **error);

int
libcthreads_queue_try_push(libcthreads_queue_t *queue, intptr_t *value,
    libcthreads_error_t **error);

int
libcthreads_queue_push(libcthreads_queue_t *queue, intptr_t *value,
    libcthreads_error_t **error);

int
libcthreads_queue_push_sorted(libcthreads_queue_t *queue,
    intptr_t *value,
    int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcthreads_error_t **error ),
    uint8_t sort_flags, libcthreads_error_t **error);

πŸ’– Thread pool functions πŸ’–

int
libcthreads_thread_pool_create(libcthreads_thread_pool_t **thread_pool,
    const libcthreads_thread_attributes_t *thread_attributes,
    int number_of_threads, int maximum_number_of_values,
    int (*callback_function)( intptr_t *value, void *arguments ),
    void *callback_function_arguments, libcthreads_error_t **error);

int
libcthreads_thread_pool_push(libcthreads_thread_pool_t *thread_pool,
    intptr_t *value, libcthreads_error_t **error);

int
libcthreads_thread_pool_push_sorted(libcthreads_thread_pool_t *thread_pool,
    intptr_t *value,
    int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcthreads_error_t **error ),
    uint8_t sort_flags, libcthreads_error_t **error);

int
libcthreads_thread_pool_join(libcthreads_thread_pool_t **thread_pool,
    libcthreads_error_t **error);

🌸 DESCRIPTION 🌸

The libcthreads_get_version() function is used to retrieve the library version. That’s the whole description, bestie β€” short and iconic ✨


πŸ’… RETURN VALUES πŸ’…

Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libcthreads.h".

quick vibe check: it really does depend on the return type, so don’t go assuming every single function returns the same thing πŸ’›

πŸ¦‹ ENVIRONMENT πŸ¦‹

None.


πŸ“ FILES πŸ“

None.


πŸ’€ BUGS πŸ’€

Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libcthreads/issues


🧚 AUTHOR 🧚

These man pages are generated from "libcthreads.h".


Copyright (C) 2012-2024, Joachim Metz <joachim.metz@gmail.com>.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


🌈 SEE ALSO 🌈

the libcthreads.h include file


mwah πŸ’‹ β€” source/version: libcthreads; date: March 11, 2019; manual: libcthreads(3).