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
6#include "lcmd.h"
7
11struct tpreq_s {
12 lcmdset_set_t* cs;
13 struct inode_s* node;
14 int flags;
15};
16
19#define TPOPT_LOGFILES 1
20
25int tpinit(int size, int flags);
26
32int tpqueue(const struct tpreq_s* req);
33
36void tpwait(void);
37
41void tpshutdown(void);
42
47void tpfree(void);
48
49#endif//FSAUTOPROC_TP_H
File-specific system command execution mapping functions.
Individual file node in the index map.
Definition index.h:13
Pending work request which contains a command set to execute on a thread in the pool,...
Definition tp.h:11
struct inode_s * node
File node to pass to the command set.
Definition tp.h:13
lcmdset_set_t * cs
Command set to execute.
Definition tp.h:12
int flags
Trigger flags for the command set.
Definition tp.h:14
void tpwait(void)
Waits for all threads in the global pool to finish executing their work requests.
Definition tp.c:157
int tpinit(int size, int flags)
Initializes a global worker thread pool of the given size.
Definition tp.c:114
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:131
void tpshutdown(void)
Waits for all threads in the global pool to finish executing their work requests, and then shuts down...
Definition tp.c:164
void tpfree(void)
Frees all memory allocated by tpinit(). This function should be called at the end of the program....
Definition tp.c:177