c-template
|
#include <stdio.h>
#include <stdlib.h>
#include <stdatomic.h>
#include <pthread.h>
#include <unistd.h>
#include <assert.h>
#include "../../include/sync/wait_group.h"
Go to the source code of this file.
Functions | |
wait_group_t * | wait_group_new () |
returns a new and initialized wait_group_t pointer More... | |
void | wait_group_recv_signal (wait_group_t *wg) |
void | wait_group_send_signal (wait_group_t *wg) |
void | wait_group_reset_signal (wait_group_t *wg) |
void | wait_group_wait (wait_group_t *wg) |
used to wait until current active_processes reaches 0, polling every 0.75 seconds will run free on the wait_group_t pointer to clear up resources More... | |
void | wait_group_add (wait_group_t *wg, int count) |
incremements the total number of active processes managed by this wait group More... | |
int | wait_group_done (wait_group_t *wg) |
used by a process to indicate it is done, decreasing the active process counter we include a return code here to catch errors when trying to decrement count below 0 More... | |
void wait_group_add | ( | wait_group_t * | wg, |
int | count | ||
) |
incremements the total number of active processes managed by this wait group
wg | the waitgroup to manipulate |
count | the number of new active processes |
Definition at line 64 of file wait_group.c.
int wait_group_done | ( | wait_group_t * | wg | ) |
used by a process to indicate it is done, decreasing the active process counter we include a return code here to catch errors when trying to decrement count below 0
wg | the waitgroup to manipulate a runtime error will occur and program will exit |
Definition at line 70 of file wait_group.c.
wait_group_t* wait_group_new | ( | ) |
returns a new and initialized wait_group_t pointer
Definition at line 9 of file wait_group.c.
void wait_group_recv_signal | ( | wait_group_t * | wg | ) |
Definition at line 21 of file wait_group.c.
void wait_group_reset_signal | ( | wait_group_t * | wg | ) |
Definition at line 33 of file wait_group.c.
void wait_group_send_signal | ( | wait_group_t * | wg | ) |
Definition at line 27 of file wait_group.c.
void wait_group_wait | ( | wait_group_t * | wg | ) |
used to wait until current active_processes reaches 0, polling every 0.75 seconds will run free on the wait_group_t pointer to clear up resources
wg | the waitgroup to wait on |
Definition at line 45 of file wait_group.c.