![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Common thread instantiation and detach for worker and coordinator threads. More...
#include <freeradius-devel/io/thread.h>#include <freeradius-devel/server/module_rlm.h>#include <freeradius-devel/server/virtual_servers.h>#include <freeradius-devel/server/main_config.h>#include <freeradius-devel/tls/base.h>#include <freeradius-devel/unlang/base.h>#include <freeradius-devel/util/syserror.h>#include <signal.h>
Include dependency graph for thread.c:Go to the source code of this file.
Functions | |
| int | fr_thread_create (pthread_t *thread, fr_thread_entry_t func, void *arg) |
| Create a joinable thread. | |
| void | fr_thread_detach (void) |
| Detach thread-specific data for modules, virtual servers, xlats. | |
| void | fr_thread_exit (fr_thread_t *thread, fr_thread_status_t status, fr_sem_t *sem) |
| Signal the parent that we're done. | |
| int | fr_thread_instantiate (TALLOC_CTX *ctx, fr_event_list_t *el) |
| Instantiate thread-specific data for modules, virtual servers, xlats, unlang, and TLS. | |
| int | fr_thread_setup (fr_thread_t *out, char const *name) |
| Common setup for child threads: block signals, allocate a talloc context, and create an event list. | |
| void | fr_thread_start (fr_thread_t *thread, fr_sem_t *sem) |
| Signal the parent that we're done. | |
| int | fr_thread_wait_list (fr_sem_t *sem, fr_dlist_head_t *head) |
| Wait for multiple threads to signal readiness via a semaphore. | |
Common thread instantiation and detach for worker and coordinator threads.
Definition in file thread.c.
| int fr_thread_create | ( | pthread_t * | thread, |
| fr_thread_entry_t | func, | ||
| void * | arg | ||
| ) |
Create a joinable thread.
| [out] | thread | handle that was created by pthread_create. |
| [in] | func | entry point for the thread. |
| [in] | arg | Argument to pass to func. |
Definition at line 46 of file thread.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fr_thread_detach | ( | void | ) |
| void fr_thread_exit | ( | fr_thread_t * | thread, |
| fr_thread_status_t | status, | ||
| fr_sem_t * | sem | ||
| ) |
| int fr_thread_instantiate | ( | TALLOC_CTX * | ctx, |
| fr_event_list_t * | el | ||
| ) |
Instantiate thread-specific data for modules, virtual servers, xlats, unlang, and TLS.
| [in] | ctx | to allocate thread-specific data in. |
| [in] | el | event list for this thread. |
Definition at line 165 of file thread.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_thread_setup | ( | fr_thread_t * | out, |
| char const * | name | ||
| ) |
Common setup for child threads: block signals, allocate a talloc context, and create an event list.
| [out] | out | structure describing the thread |
| [in] | name | Human-readable name used for the talloc context and error messages. |
Definition at line 112 of file thread.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fr_thread_start | ( | fr_thread_t * | thread, |
| fr_sem_t * | sem | ||
| ) |
| int fr_thread_wait_list | ( | fr_sem_t * | sem, |
| fr_dlist_head_t * | head | ||
| ) |
Wait for multiple threads to signal readiness via a semaphore.
| [in] | sem | semaphore to wait on. |
| [in] | head | head of the list to wait for |
Definition at line 79 of file thread.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.9.8