; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Process management library.
;
;  Target OS: Dummy
;
;  Dependencies:
;
;  Notes:
;_________________________________________________________________________________________


struct TMutex
ends

proc Terminate, .exit_code
begin
        return
endp


; Terminate current process
; Returns: nothing.

proc TerminateAll, .exit_code
begin
        return
endp



proc GetCmdArguments
begin
        stc
        return
endp



; Creates a new execution thread
; Returns: CF=1 if error.
;          CF=0, eax = pid of the new process being created

proc ThreadCreate, .ptr_to_function, .ptr_to_args
begin
        stc
        return
endp



proc FreeThreadID, .ThreadID
begin
        return
endp



; MUTEX functions
;_________________________________________________________________________________________

proc MutexCreate, .ptrName, .ptrMutex
begin
        return
endp




proc WaitForMutex, .ptrMutex, .timeout
begin
        clc
        return
endp




proc MutexRelease, .ptrMutex
begin
        pushf
        popf
        return
endp



proc MutexDestroy, .ptrMutex
begin
        pushf
        popf
        return
endp

