Next: Signals
Up: Technicals
Previous: Scan engine
Clam Antivirus uses POSIX threads. There is a threadscan() function,
you can find in treewalk.c. Threads are created in the joinable
state
(PTHREAD_CREATE_JOINABLE, default). If the program is started in
superuser mode, the realtime scheduling policy SCHED_FIFO is turned on.
Each thread reads files list, as long as value of stopper is false.
Threads are synchronized by semaphore, modification of list is
protected by mutex.
Tomasz Kojm
2002-08-22