test build

This commit is contained in:
2026-08-27 20:14:05 +02:00
parent 6a007c2cd8
commit 80a413efdc
56 changed files with 24520 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
/**
* @file discord-worker.h
* @author Cogmasters
* @brief Global threadpool
*/
#ifndef DISCORD_WORKER_H
#define DISCORD_WORKER_H
#include "concord-error.h"
/* forward declaration */
struct discord;
/**/
/** @defgroup DiscordInternalWorker Global threadpool
* @ingroup DiscordInternal
* @brief A global threadpool for worker-threads handling
* @{ */
/**
* @brief Initialize global threadpool and priority queue
*
* @param flags unused for now, but reserved for future use
* @CCORD_return
*/
CCORDcode discord_worker_global_init(long flags);
/** @brief Cleanup global threadpool and priority queue */
void discord_worker_global_cleanup(void);
/**
* @brief Run a callback from a worker thread
*
* @param client the client that will be using the worker thread
* @param callback user callback to be executed
* @param data user data to be passed to callback
* @CCORD_return
*/
CCORDcode discord_worker_add(struct discord *client,
void (*callback)(void *data),
void *data);
/**
* @brief Wait until worker-threads being used by `client` have been joined
*
* @param client the client currently using a worker thread
* @CCORD_return
*/
CCORDcode discord_worker_join(struct discord *client);
/** @} DiscordInternalWorker */
#endif /* DISCORD_WORKER_H */