; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Process management library.
;
;  Target OS: Any
;
;  Dependencies:
;
;  Notes: Includes the proper OS dependent part of the library.
;_________________________________________________________________________________________
module "Process library"


interface Terminate, .exit_code

interface TerminateAll, .exit_code

interface SetForcedTerminateHandler, .procHandler

interface procForcedTerminateHandler, .reason

interface GetCmdArguments



interface ThreadCreate, .ptrFunction, .ptrArguments

interface FreeThreadID, .ThreadID


interface Exec, .hCommand

interface FreeProcessID, .ProcessID

interface WaitProcessExit, .ProcessID, .timeout



interface MutexCreate, .ptrName, .ptrMutex

interface WaitForMutex, .ptrMutex, .timeout

interface MutexRelease, .ptrMutex

interface MutexDestroy, .ptrMutex


include '%TargetOS%/process.asm'


if used ThreadCreate
  options.Threads = 1
else
  options.Threads = 0
end if


endmodule
