Linux Manuals

The Linux Manuals (man pages) document is an important part of Linux documents. Linux Manuals are organized as several sections. Each section has a group of commands for a specific area in Linux usage, administration or development.

  • |

    qecvt (3) Linux Manual Page

    qecvt, qfcvt, qgcvt – convert a floating-point number to a string Synopsis #include <stdlib.h> char *qecvt(long double number, int ndigits, int *decpt, int *sign); char *qfcvt(long double number, int ndigits, int *decpt, int *sign); char *qgcvt(long double number, int ndigit, char *buf); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): qecvt(), qfcvt(), qgcvt(): _SVID_SOURCE Description…

  • |

    qbutil.h (3) Linux Manual Page

    qbutil.h – These are some convience functions used throughout libqb. Synopsis #include <pthread.h> #include <stdint.h> #include <unistd.h> #include <qb/qbdefs.h> Macros #define QB_UTIL_SW_OVERWRITE 0x01 Typedefs typedef struct qb_thread_lock_s qb_thread_lock_t typedef void(* qb_util_log_fn_t )(const char *file_name, int32_t file_line, int32_t severity, const char *msg) typedef struct qb_util_stopwatch qb_util_stopwatch_t Enumerations enum qb_thread_lock_type_t { QB_THREAD_LOCK_SHORT, QB_THREAD_LOCK_LONG } QB_THREAD_LOCK_SHORT is a…

  • |

    qbrb.h (3) Linux Manual Page

    qbrb.h – This implements a ring buffer that works in ‘chunks’ not bytes. Synopsis #include <sys/types.h> #include <stdint.h> Macros #define QB_RB_FLAG_CREATE 0x01 create a ring buffer (rather than open and existing one) #define QB_RB_FLAG_OVERWRITE 0x02 New calls to qb_rb_chunk_write() will call qb_rb_chunk_reclaim() if there is not enough space. #define QB_RB_FLAG_SHARED_THREAD 0x04 The ringbuffer will be…

  • |

    qbmap.h (3) Linux Manual Page

    qbmap.h – This provides a map interface to a Patricia trie, hashtable or skiplist. Synopsis #include <stdint.h> #include <unistd.h> Macros #define QB_MAP_NOTIFY_DELETED 1 #define QB_MAP_NOTIFY_REPLACED 2 #define QB_MAP_NOTIFY_INSERTED 4 #define QB_MAP_NOTIFY_RECURSIVE 8 #define QB_MAP_NOTIFY_FREE 16 Typedefs typedef struct qb_map qb_map_t This is an opaque data type representing an instance of a map. typedef struct qb_map_iter…

  • |

    qbloop.h (3) Linux Manual Page

    qbloop.h – Main loop manages timers, jobs and polling sockets. Synopsis #include <signal.h> #include <stdint.h> Typedefs typedef struct qb_loop qb_loop_t An opaque data type representing the main loop. typedef uint64_t qb_loop_timer_handle typedef void * qb_loop_signal_handle typedef int32_t(* qb_loop_poll_dispatch_fn )(int32_t fd, int32_t revents, void *data) typedef void(* qb_loop_job_dispatch_fn )(void *data) typedef void(* qb_loop_timer_dispatch_fn )(void *data) typedef…

  • |

    qblog.h (3) Linux Manual Page

    qblog.h – The logging API provides four main parts (basics, filtering, threading & blackbox). Synopsis #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include <errno.h> #include <syslog.h> #include <string.h> #include <qb/qbutil.h> #include <qb/qbconfig.h> Data Structures struct qb_log_callsite An instance of this structure is created in a special ELF section at every dynamic debug callsite. union…

  • |

    qblist.h (3) Linux Manual Page

    qblist.h – This is a kernel style list implementation. Synopsis #include <stdint.h> #include <qb/qbdefs.h> Data Structures struct qb_list_head Macros #define QB_LIST_DECLARE(name) struct qb_list_head name = {&(name), &(name)} Declare and initialize a list head. #define QB_INIT_LIST_HEAD(ptr) #define qb_list_entry(ptr, type, member) ((type *)((char *)(ptr) – (char *)(&((type *)0)->member))) Get the struct for this entry. #define qb_list_first_entry(ptr, type,…

  • |

    qbipcs.h (3) Linux Manual Page

    qbipcs.h – Server IPC API. Synopsis #include <stdlib.h> #include <sys/uio.h> #include <qb/qbipc_common.h> #include <qb/qbhdb.h> #include <qb/qbloop.h> Data Structures struct qb_ipcs_stats struct qb_ipcs_connection_stats struct qb_ipcs_connection_stats_2 struct qb_ipcs_poll_handlers struct qb_ipcs_service_handlers Typedefs typedef struct qb_ipcs_connection qb_ipcs_connection_t typedef struct qb_ipcs_service qb_ipcs_service_t typedef int32_t(* qb_ipcs_dispatch_fn_t )(int32_t fd, int32_t revents, void *data) typedef int32_t(* qb_ipcs_dispatch_add_fn )(enum qb_loop_priority p, int32_t fd, int32_t…

  • |

    qbipcc.h (3) Linux Manual Page

    qbipcc.h – Client IPC API. Synopsis #include <qb/qbconfig.h> #include <pthread.h> #include <sys/poll.h> #include <sys/socket.h> #include <qb/qbhdb.h> #include <qb/qbipc_common.h> Typedefs typedef struct qb_ipcc_connection qb_ipcc_connection_t Functions qb_ipcc_connection_t * qb_ipcc_connect (const char *name, size_t max_msg_size) Create a connection to an IPC service. int32_t qb_ipcc_verify_dgram_max_msg_size (size_t max_msg_size) Test kernel dgram socket buffers to verify the largest size up to…

  • |

    qbipc_common.h (3) Linux Manual Page

    qbipc_common.h – common types and definitions Synopsis #include <stdint.h> Data Structures struct qb_ipc_request_header struct qb_ipc_response_header Macros #define QB_IPC_MSG_NEW_MESSAGE 0 #define QB_IPC_MSG_USER_START QB_IPC_MSG_NEW_MESSAGE #define QB_IPC_MSG_AUTHENTICATE -1 #define QB_IPC_MSG_NEW_EVENT_SOCK -2 #define QB_IPC_MSG_DISCONNECT -3 Enumerations enum qb_ipc_type { QB_IPC_SOCKET, QB_IPC_SHM, QB_IPC_POSIX_MQ, QB_IPC_SYSV_MQ, QB_IPC_NATIVE } Functions struct qb_ipc_request_header __attribute__ ((aligned(8))) Variables enum qb_ipc_type __attribute__ Detailed Description common types and…

  • |

    qbhdb.h (3) Linux Manual Page

    qbhdb.h – The handle database is for reference counting objects. Synopsis #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <qb/qbarray.h> Data Structures struct qb_hdb_handle struct qb_hdb Macros #define _GNU_SOURCE #define QB_HDB_D_FORMAT ‘%’ PRIu64 #define QB_HDB_X_FORMAT ‘%’ PRIx64 #define QB_HDB_DECLARE(database_name, destructor_function) Convience macro for declaring a file scoped handle database. Typedefs typedef uint64_t qb_handle_t Generic handle type…

  • |

    qbatomic.h (3) Linux Manual Page

    qbatomic.h – Basic atomic integer and pointer operations. Synopsis #include <stdint.h> #include <qb/qbdefs.h> #include <qb/qbconfig.h> Macros #define qb_atomic_int_get(atomic) #define qb_atomic_int_set(atomic, newval) #define qb_atomic_pointer_get(atomic) #define qb_atomic_pointer_set(atomic, newval) #define qb_atomic_int_inc(atomic) (qb_atomic_int_add ((atomic), 1)) Atomically increments the integer pointed to by atomic by 1. #define qb_atomic_int_dec_and_test(atomic) (qb_atomic_int_exchange_and_add ((atomic), -1) == 1) Atomically decrements the integer pointed to by…

  • |

    qbarray.h (3) Linux Manual Page

    qbarray.h – This is a dynamic array (it can grow, but without moving memory). Synopsis #include <stdint.h> #include <unistd.h> #include <qb/qbdefs.h> Typedefs typedef struct qb_array qb_array_t This is an opaque data type representing an instance of an array. typedef void(* qb_array_new_bin_cb_fn )(qb_array_t *a, uint32_t bin) Functions qb_array_t * qb_array_create (size_t max_elements, size_t element_size) Create an…

  • |

    pvalloc (3) Linux Manual Page

    posix_memalign, aligned_alloc, memalign, valloc, pvalloc – allocate aligned memory Synopsis #include <stdlib.h> int posix_memalign(void **memptr, size_t alignment, size_t size); void *aligned_alloc(size_t alignment, size_t size); void *valloc(size_t size); #include <malloc.h> void *memalign(size_t alignment, size_t size); void *pvalloc(size_t size); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): posix_memalign(): _POSIX_C_SOURCE >= 200112L aligned_alloc(): _ISOC11_SOURCE valloc(): Since glibc 2.12: (_XOPEN_SOURCE >= 500) &&…

  • |

    putwchar_unlocked (3) Linux Manual Page

    getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked – nonlocking stdio functions Synopsis #include <stdio.h> int getc_unlocked(FILE *stream); int getchar_unlocked(void); int putc_unlocked(int c, FILE *stream); int putchar_unlocked(int c); void clearerr_unlocked(FILE *stream); int feof_unlocked(FILE *stream); int ferror_unlocked(FILE *stream); int fileno_unlocked(FILE *stream); int fflush_unlocked(FILE *stream); int fgetc_unlocked(FILE *stream); int fputc_unlocked(int c, FILE *stream); size_t fread_unlocked(void *ptr, size_t size, size_t n, FILE…

  • |

    putwchar (3) Linux Manual Page

    putwchar – write a wide character to standard output Synopsis #include <wchar.h> wint_t putwchar(wchar_t wc); Description The putwchar() function is the wide-character equivalent of the putchar(3) function. It writes the wide character wc to stdout. If ferror(stdout) becomes true, it returns WEOF. If a wide character conversion error occurs, it sets errno to EILSEQ and…

  • |

    putwc_unlocked (3) Linux Manual Page

    getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked – nonlocking stdio functions Synopsis #include <stdio.h> int getc_unlocked(FILE *stream); int getchar_unlocked(void); int putc_unlocked(int c, FILE *stream); int putchar_unlocked(int c); void clearerr_unlocked(FILE *stream); int feof_unlocked(FILE *stream); int ferror_unlocked(FILE *stream); int fileno_unlocked(FILE *stream); int fflush_unlocked(FILE *stream); int fgetc_unlocked(FILE *stream); int fputc_unlocked(int c, FILE *stream); size_t fread_unlocked(void *ptr, size_t size, size_t n, FILE…

  • |

    putwc (3) Linux Manual Page

    fputwc, putwc – write a wide character to a FILE stream Synopsis #include <stdio.h> #include <wchar.h> wint_t fputwc(wchar_t wc, FILE *stream); wint_t putwc(wchar_t wc, FILE *stream); Description The fputwc() function is the wide-character equivalent of the fputc(3) function. It writes the wide character wc to stream. If ferror(stream) becomes true, it returns WEOF. If a…

  • |

    putw (3) Linux Manual Page

    getw, putw – input and output of words (ints) Synopsis #include <stdio.h> int getw(FILE *stream); int putw(int w, FILE *stream); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getw(), putw(): Since glibc 2.3.3: _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)     || /* Glibc since 2.19: */ _DEFAULT_SOURCE     || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE Before glibc 2.3.3: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE Description getw() reads a…