MCPcopy Create free account

hub / github.com/KaisenAmin/c_std / functions

Functions2,651 in github.com/KaisenAmin/c_std

Functionsysinfo_disk_free_bytes
* @brief Returns the free space, in bytes, available to the caller on the * filesystem containing @p path. * * Reports space available to an
sysinfo/sysinfo.c:3157
Functionsysinfo_disk_partitions
* @brief Retrieves the disk partitions on the system. * * This function gathers information about the disk partitions available on the system and s
sysinfo/sysinfo.c:2369
Functionsysinfo_disk_space
* @brief Return a "Total: N MB, Used: U MB, Available: A MB" string for * the filesystem containing @p path. * * Backend: * - Windows: Ge
sysinfo/sysinfo.c:1666
Functionsysinfo_disk_total_bytes
* @brief Returns the total size, in bytes, of the filesystem containing @p path. * * The numeric counterpart of `sysinfo_disk_space()`. Pass any pat
sysinfo/sysinfo.c:3117
Functionsysinfo_endianness
* @brief Returns the byte order of the host CPU as a static string. * * Either `"little"` or `"big"`. The check is a runtime probe over the * repre
sysinfo/sysinfo.c:2845
Functionsysinfo_executable_path
* @brief Returns the absolute path to the currently-running executable. * * Implementation: * - Windows: `GetModuleFileNameA(NULL, ...)` with an M
sysinfo/sysinfo.c:2670
Functionsysinfo_free_swap_bytes
* @brief Returns the amount of free swap space, in bytes. * * Implementation: * - Linux: parses `SwapFree` from `/proc/meminfo`. * - Windows:
sysinfo/sysinfo.c:2940
Functionsysinfo_home_directory
* @brief Returns the current user's home directory as a freshly-allocated string. * * Implementation: * - Windows: prefers `$USERPROFILE`; if abse
sysinfo/sysinfo.c:2528
Functionsysinfo_is_64bit_process
* @brief Returns true if the current process is a 64-bit binary. * * Determined from `sizeof(void*) == 8` — no syscalls, no platform * dispatch. Th
sysinfo/sysinfo.c:2825
Functionsysinfo_is_admin
* @brief Returns true if the current process has administrative / root rights. * * Implementation: * - Windows: queries the process token's `Token
sysinfo/sysinfo.c:3082
Functionsysinfo_is_service_running
* @brief Checks if a specific service or process is running. * * This function checks if a service or process by the given name is running on the s
sysinfo/sysinfo.c:2259
Functionsysinfo_is_virtualized
* @brief Return true if the process is running inside a virtual * machine / hypervisor. * * Backend: * - Windows: `IsProcessorFeaturePres
sysinfo/sysinfo.c:1507
Functionsysinfo_list_bluetooth_devices
sysinfo/sysinfo.c:695
Functionsysinfo_machine_host_name
* @brief Return the machine host name (or fully-qualified domain name * where the OS exposes one). * * On Linux walks `getaddrinfo(AI_CANONN
sysinfo/sysinfo.c:854
Functionsysinfo_machine_unique_id
* @brief Return a persistent unique identifier for the machine itself. * * - Windows: registry GUID at HKLM\\SOFTWARE\\Microsoft\\Cryptography. *
sysinfo/sysinfo.c:877
Functionsysinfo_memory_usage
* @brief Return memory usage as a percentage of total physical RAM in * [0, 100]. * * Backend: * - Windows: GlobalMemoryStatusEx. * -
sysinfo/sysinfo.c:1632
Functionsysinfo_network_interfaces
* @brief Return a Vector of active network interfaces and their IPv4 * addresses. * * Each element is a `SysinfoNetworkInterface` struct wit
sysinfo/sysinfo.c:1934
Functionsysinfo_open_ports
* @brief Return a Vector of open TCP listening ports on the system. * * Each element is an `int` (boxed via the vector's element size of * `sizeof(
sysinfo/sysinfo.c:2117
Functionsysinfo_pretty_product_name
* @brief Return a human-readable "<product> Version <version> (Build N)" * string suitable for display. * * Windows uses RtlGetVersion + a t
sysinfo/sysinfo.c:901
Functionsysinfo_process_count
* @brief Returns the number of processes currently running on the system. * * Implementation: * - Windows: counts entries from a `CreateToolhelp32
sysinfo/sysinfo.c:3022
Functionsysinfo_process_id
* @brief Returns the process ID of the current process. * * Implementation: * - Windows: `GetCurrentProcessId()` (DWORD widened to long). * - PO
sysinfo/sysinfo.c:2710
Functionsysinfo_process_list
* @brief Return a Vector of currently-running process names. * * Each element is a `char*` allocated with `strdup`. The Vector itself * is allocate
sysinfo/sysinfo.c:1824
Functionsysinfo_process_memory_bytes
* @brief Returns the resident memory (RSS / working set) of the CALLING * process, in bytes. * * This is the per-process complement to the s
sysinfo/sysinfo.c:3273
Functionsysinfo_running_services
* @brief Enumerate currently-running services / daemons. * * Backend: * - Windows: SCM `EnumServicesStatus`. * - Linux: `systemctl list-unit
sysinfo/sysinfo.c:1734
Functionsysinfo_system_locale
* @brief Return the current system locale as a newly-allocated string * (e.g. "en-US", "fa_IR.UTF-8"). * * Backend: * - Windows: `GetLoca
sysinfo/sysinfo.c:2196
Functionsysinfo_system_uptime
* @brief Return the system uptime since boot, formatted as * "N days, H hours, M minutes, S seconds". * * Backend: * - Windows: `GetTickC
sysinfo/sysinfo.c:1700
Functionsysinfo_temp_directory
* @brief Returns the system's default temporary-files directory. * * Implementation: * - Windows: `GetTempPathA`, with any trailing `\\` trimmed.
sysinfo/sysinfo.c:2584
Functionsysinfo_total_swap_bytes
* @brief Returns the total size of swap space, in bytes. * * Implementation: * - Linux: parses `SwapTotal` from `/proc/meminfo`. * - Windows:
sysinfo/sysinfo.c:2892
Functionsysinfo_uptime_seconds
* @brief Returns the system uptime in whole seconds. * * The numeric counterpart of `sysinfo_system_uptime()` (which formats a * human-readable str
sysinfo/sysinfo.c:2988
Functionsysinfo_used_memory_bytes
* @brief Returns the amount of physical memory currently in use, in bytes. * * Convenience wrapper computed as * `sysinfo_total_memory_bytes() - sy
sysinfo/sysinfo.c:2867
Functionsysinfo_username
* @brief Returns the current user's login name as a freshly-allocated string. * * Implementation: * - Windows: `GetUserNameA` into a UNLEN+1 buffe
sysinfo/sysinfo.c:2486
Functiontcp_async_recv
* @brief Receives data asynchronously from a non-blocking TCP socket. * * This function attempts to receive data from a non-blocking TCP socket. *
network/tcp.c:1911
Functiontcp_async_send
* @brief Sends data asynchronously through a non-blocking TCP socket. * * This function attempts to send data to a non-blocking TCP socket. * Ens
network/tcp.c:1862
Functiontcp_bytes_available
* @brief Report how many bytes are immediately available to read. * * Queries the socket via `FIONREAD` — the number of bytes that can be read * wi
network/tcp.c:2355
Functiontcp_connect
* @brief Establishes a connection to a remote server. * * This function attempts to establish a TCP connection to the specified remote host and por
network/tcp.c:349
Functiontcp_connect_tls
* @brief One-shot secure client connect (socket + connect + TLS + verification). * * Initializes a client SSL context, sets the verify mode, creates
network/tcp.c:1337
Functiontcp_disable_ssl
* @brief Disables SSL/TLS on a specified TCP socket. * * This function shuts down the SSL/TLS session for the specified socket, frees the associated
network/tcp.c:1123
Functiontcp_enable_ssl
* @brief Enables SSL/TLS on a specified TCP socket. * * This function creates an SSL object for the specified socket and associates it with the sock
network/tcp.c:1082
Functiontcp_get_connection_quality
* @brief Retrieves the connection quality, including round-trip time (RTT) and its variance, for a given TCP socket. * * This function extracts TCP
network/tcp.c:1813
Functiontcp_get_local_address
* @brief Retrieves the local IP address and port number of a TCP socket. * * This function retrieves the local IP address and port number bound to t
network/tcp.c:845
Functiontcp_get_peer_name
* @brief Retrieves the peer (remote) address and port of a TCP connection. * * This function retrieves the remote IP address and port number associa
network/tcp.c:919
Functiontcp_get_remote_address
* @brief Retrieves the remote IP address and port of a TCP connection. * * This function retrieves the remote IP address and port number associated
network/tcp.c:864
Functiontcp_is_valid_address
* @brief Validates if the given string is a valid IPv4 or IPv6 address. * * This function checks if the provided address is a valid IPv4 or IPv6 ad
network/tcp.c:139
Functiontcp_mutex_init_once
network/tcp.c:30
Functiontcp_recv_all
* @brief Receive EXACTLY `len` bytes, looping over partial reads. * * `tcp_recv` (and the underlying `recv()`) may return fewer bytes than * reques
network/tcp.c:2237
Functiontcp_resolve_hostname
* @brief Resolves a hostname to an IP address. * * This function resolves a given hostname to its corresponding IP address (either IPv4 or IPv6).
network/tcp.c:728
Functiontcp_set_buffer_size
* @brief Tune the kernel send and/or receive buffer sizes on a TCP socket. * * Adjusts `SO_SNDBUF` and `SO_RCVBUF`. Pass `0` for either argument to
network/tcp.c:2150
Functiontcp_set_keep_alive
* @brief Enable or disable `SO_KEEPALIVE` on a TCP socket. * * When enabled, the kernel periodically probes idle connections and * tears them down
network/tcp.c:2068
Functiontcp_set_linger
* @brief Configure `SO_LINGER` — close()-time disposal of unsent data. * * - `enable = false`: default behavior. `close()` returns immediately; *
network/tcp.c:2122
Functiontcp_set_nodelay
* @brief Enable or disable Nagle's algorithm (`TCP_NODELAY`). * * Nagle's algorithm coalesces small writes to reduce packet overhead, * but adds la
network/tcp.c:2093
Functiontcp_set_timeout
* @brief Sets a timeout for TCP socket operations. * * This function sets the timeout for receiving or sending data on the given socket. * The tim
network/tcp.c:669
Functiontcp_shutdown
* @brief Shuts down a TCP socket. * * This function shuts down the specified TCP socket for the specified direction (receive, send, or both). * Th
network/tcp.c:604
Functiontcp_ssl_accept
* @brief Accepts an SSL/TLS connection on a TCP socket. * * This function performs the SSL/TLS handshake on the specified TCP socket. It creates an
network/tcp.c:1512
Functiontcp_ssl_cleanup
* @brief Cleans up the SSL context and deallocates OpenSSL resources. * * This function frees the SSL context and performs OpenSSL cleanup operation
network/tcp.c:1387
Functiontcp_ssl_init
* @brief Initializes SSL/TLS support and loads a certificate and private key for secure communication. * * This function initializes OpenSSL, create
network/tcp.c:1161
Functiontcp_ssl_load_verify_locations
* @brief Load trusted CA certificates (a bundle file and/or a directory) into * the SSL context, for environments without a usable OS trust st
network/tcp.c:1300
Functiontcp_status_to_string
* @brief Human-readable label for a `TcpStatus` code. * * Returns a static, immutable string suitable for printing or logging * (`"TCP_SUCCESS"`, `
network/tcp.c:2007
Functionthread_current
* Retrieves the identifier of the calling thread. * * This function returns the identifier of the thread that is currently executing * the code. Th
concurrent/concurrent.c:1038
Functionthread_detach
* Detaches a thread. * * This function detaches the specified thread from the calling process, allowing * its resources to be automatically release
concurrent/concurrent.c:1102
Functionthread_equal
* Compares two thread identifiers to determine if they refer to the same thread. * * This function checks whether the two provided thread identifier
concurrent/concurrent.c:1137
Functionthread_exit
* Terminates the calling thread. * * Exits the current thread, optionally returning a result code to any joining threads. * If thread-specific data
concurrent/concurrent.c:1168
Functionthread_pool_add_task
* @brief Submit a task to the pool. The task runs on the next available worker. * * The task struct itself is allocated internally and freed after t
concurrent/thread_pool.c:140
Functionthread_pool_pending_count
* @brief Number of outstanding tasks: queued plus currently executing. * * Reaches 0 only once every submitted task has finished (the same condition
concurrent/thread_pool.c:300
Functionthread_pool_queued_count
* @brief Number of tasks still waiting in the queue (not yet picked up). * * This is the backlog only; `thread_pool_pending_count() - thread_pool_qu
concurrent/thread_pool.c:320
Functionthread_pool_thread_count
* @brief Number of worker threads actually running in the pool. * * Usually equals the count requested in `thread_pool_create`, but can be * smalle
concurrent/thread_pool.c:340
Functionthread_pool_wait_timeout
* @brief Block until all tasks finish, or until @p timeout_ms elapses. * * Like `thread_pool_wait`, but bounded — it returns `false` if the deadline
concurrent/thread_pool.c:356
Functionthread_pool_worker
Worker loop: * 1. Wait for a task to appear (or for keepAlive to drop). * 2. Pop the task off the queue under queue.lock. * 3. Run the task w
concurrent/thread_pool.c:13
Functionthread_sleep
* Suspends the execution of the current thread for a specified duration. * * This function makes the calling thread sleep for the time specified in
concurrent/concurrent.c:1265
Functionthread_specific_create
* Creates a thread-specific storage (TSS) key. * * Allocates a key that can be used by threads to store and retrieve data unique to each thread. *
concurrent/concurrent.c:1370
Functionthread_specific_delete
* Deletes a thread-specific storage (TSS) key. * * Frees a previously allocated TSS key, optionally invoking the destructor function * for any non-
concurrent/concurrent.c:1416
Functionthread_specific_get
* Retrieves the value associated with a thread-specific storage (TSS) key for the current thread. * * This function returns the value associated wit
concurrent/concurrent.c:1470
Functionthread_specific_set
* Sets the value of a thread-specific storage (TSS) key for the current thread. * * Associates a new value with a given TSS key for the calling thre
concurrent/concurrent.c:1520
Functiontime_add_secs
* @brief This function adds the specified number of seconds to the provided Time object. * It handles the overflow of seconds to minutes and minutes
time/std_time.c:188
Functiontime_compare
* @brief Three-way comparison of two Time objects. * * Returns -1 if @p lhs comes strictly before @p rhs, +1 if strictly after, * 0 if equal. The t
time/std_time.c:1280
Functiontime_copy
* @brief Deep copy of a Time object. * * Allocates a new Time and copies the four fields. The source is not modified. * Returns NULL on NULL/invali
time/std_time.c:895
Functiontime_current_time_in_microseconds
* @brief This function returns the current time in microseconds, with fractional microseconds represented as a double. * It is platform-specific, usi
time/std_time.c:744
Functiontime_current_time_in_seconds
* @brief This function returns the current time in seconds, with fractional seconds represented as a double. * It is platform-specific, using `GetSys
time/std_time.c:709
Functiontime_deallocate
* @brief This function frees the memory allocated for a Time object. If the pointer to the Time object is NULL, * the function will simply return wit
time/std_time.c:691
Functiontime_diff_in_msecs
* @brief Exact difference between two Time objects in milliseconds. * * Returns a double for parity with time_diff_in_seconds() but with millisecond
time/std_time.c:1321
Functiontime_diff_in_seconds
* @brief This function computes the difference in time between two Time objects, returning the result in seconds. * If the time difference spans acro
time/std_time.c:840
Functiontime_format
* @brief strftime-like formatter for Time objects. * * Recognised specifiers (all others pass through literally): * %H - hour 00..23 * %I -
time/std_time.c:1368
Functiontime_from_msecs_since_start_of_day
* @brief This function converts a time given in milliseconds since the start of the day to a Time object. * * @param msecs The number of millisecon
time/std_time.c:498
Functiontime_from_seconds_of_day
* @brief Build a Time object from a floating-point seconds-of-day value. * * @p secs must be in [0.0, 86400.0); milliseconds are taken from the frac
time/std_time.c:1101
Functiontime_from_string
* @brief Parse a textual time representation back into a Time object. * * Accepted forms (whitespace at the front is skipped, trailing characters *
time/std_time.c:988
Functiontime_hour
* @brief This function returns the hour component of the provided Time object. * If the Time object is NULL or invalid, it returns -1. * * @param
time/std_time.c:230
Functiontime_is_greater_than_or_equal
* @brief This function compares two Time objects and returns true if the first Time object (`lhs`) * represents the same time or a later time than t
time/std_time.c:647
Functiontime_is_less_than_or_equal
* @brief This function checks if the first Time object (`lhs`) represents an earlier time or the same time as the second Time object (`rhs`). * It re
time/std_time.c:595
Functiontime_is_midnight
* @brief Is the Time exactly midnight (00:00:00.000)? * * Useful as a sentinel in day-rollover logic. Returns false for NULL or invalid * inputs so
time/std_time.c:1250
Functiontime_is_not_equal
* @brief This function compares two Time objects and returns true if they do not represent the same time. * * @param lhs Pointer to the first Time
time/std_time.c:670
Functiontime_is_null
* @brief This function checks whether the provided Time object is NULL. * * @param t Pointer to the Time object. * @return true if the Time object
time/std_time.c:214
Functiontime_minute
* @brief This function returns the minute component of the provided Time object. * If the Time object is NULL or invalid, it returns -1. * * @par
time/std_time.c:254
Functiontime_monotonic_msecs
* @brief Monotonic clock reading in milliseconds. * * Convenience wrapper over `time_monotonic_nsecs` (divided by 1,000,000). Same * semantics: ste
time/std_time.c:1229
Functiontime_msec
* @brief his function returns the millisecond component of the provided Time object. * * @param t Pointer to the Time object. * @return The millis
time/std_time.c:300
Functiontime_msecs_since_start_of_day
* @brief This function retrieves the current system time and calculates the number of milliseconds that have * elapsed since the start of the day (00
time/std_time.c:323
Functiontime_msecs_to
* @brief This function computes the difference in milliseconds between the `to` and `from` Time objects. * The result is adjusted to ensure it is wit
time/std_time.c:350
Functiontime_now_unix_msecs
* @brief Milliseconds since the Unix epoch (1970-01-01T00:00:00 UTC). * * Uses platform-specific high-resolution clocks: GetSystemTimeAsFileTime on
time/std_time.c:1142
Functiontime_second
* @brief This function returns the second component of the provided Time object. * * @param t Pointer to the Time object. * @return The second com
time/std_time.c:277
Functiontime_secs_to
* @brief This function computes the difference in seconds between the `to` and `from` Time objects. * The result is adjusted to ensure it is within t
time/std_time.c:382
Functiontime_set_hms
* @brief This function sets the hour, minute, second, and millisecond components of a Time object. * The provided values must represent a valid time
time/std_time.c:416
Functiontime_sleep
* @brief This function is platform-dependent and utilizes the appropriate system calls to achieve the delay. * On Windows, it uses the Sleep function
time/std_time.c:783
← previousnext →2,301–2,400 of 2,651, ranked by callers