MT_SETLOCK(3)

FUNCTION
mt_setlock - Set a lock on a thread pool.

SYNOPSIS
#include <karma_mt.h>

void mt_setlock

(KThreadPool pool, flag lock)

DESCRIPTION
This function will lock a thread pool such that no other thread can lock the pool at the same time. This does not prevent other threads from running, nor new jobs from being launched, it merely prevents them from aquiring the lock.

pool
    The thread pool to lock.

lock
    If TRUE the pool is locked. If FALSE the pool is unlocked and any other threads wishing to lock the pool may do so (one at a time of course).

RETURN VALUE
Nothing.

Multi-threading Level
Safe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/