fsautoproc
Basic file transformation automation management utility
Loading...
Searching...
No Matches
tp.h
Go to the documentation of this file.
1
3#ifndef FSAUTOPROC_TP_H
4#define FSAUTOPROC_TP_H
5
9struct tpreq_s {
10 struct lcmdset_s** cs;
11 struct inode_s* node;
12 int flags;
13};
14
17#define TPOPT_LOGFILES 1
18
23int tpinit(int size, int flags);
24
30int tpqueue(const struct tpreq_s* req);
31
34void tpwait(void);
35
39void tpshutdown(void);
40
45void tpfree(void);
46
47#endif//FSAUTOPROC_TP_H
Individual file node in the index map.
Definition index.h:12
A set of system commands to execute when a file event of a specific type and file path is triggered.
Definition lcmd.h:46
Pending work request which contains a command set to execute on a thread in the pool,...
Definition tp.h:9
struct inode_s * node
File node to pass to the command set.
Definition tp.h:11
struct lcmdset_s ** cs
command set to execute
Definition tp.h:10
int flags
Trigger flags for the command set.
Definition tp.h:12
void tpwait(void)
Waits for all threads in the global pool to finish executing their work requests.
Definition tp.c:128
int tpinit(int size, int flags)
Initializes a global worker thread pool of the given size.
Definition tp.c:88
int tpqueue(const struct tpreq_s *req)
Allocates a work request to the first available thread in the global pool. If no threads are availabl...
Definition tp.c:111
void tpshutdown(void)
Waits for all threads in the global pool to finish executing their work requests, and then shuts down...
Definition tp.c:135
void tpfree(void)
Frees all memory allocated by tpinit(). This function should be called at the end of the program....
Definition tp.c:149