Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SemaCondvar and SemaMonitor...

3 views
Skip to first unread message

aminer

unread,
Jan 28, 2014, 7:37:32 PM1/28/14
to

Hello,

I have invented my SemaCondvar and my SemaMonitor, and
i have just upgraded my SemaMonitor, my new SemaMonitor
is a combination of a Semaphore and EventCount, and it
supports also the charracteristics of a windows manual
event object and a windows automatic event object and
it is FIFO fair and starvation-free. the windows event
object is FIFO fair nor starvatoin free.. and my SemaCondvar
is a combination of a Semaphore and a Condition variable.


Here is the new interface that i have implemented:

TSemaCondvar = class
public

constructor
Create(m1:TCriticalSection;state1:boolean=false;InitialCount1:longword=0;MaximumCount1:longword=INFINITE);
destructor Destroy; override;
function wait(mstime:longword=INFINITE):boolean;
procedure signal();overload;
procedure signal_all();
procedure signal(nbr:integer);overload;
function WaitersBlocked:integer;
end;

TSemaMonitor = class
public
constructor
Create(state1:boolean=false;InitialCount1:longword=0;MaximumCount1:longword=INFINITE);
destructor Destroy; override;
function wait(mstime:longword=INFINITE):boolean;
procedure signal();overload;
procedure signal_all();
procedure signal(nbr:integer);overload;
function WaitersBlocked:integer;
procedure setSignal;
procedure resetSignal;
end;



You can download my new SemaCondvar and SemaMonitor from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.


aminer

unread,
Jan 28, 2014, 7:40:34 PM1/28/14
to
On 1/28/2014 4:37 PM, aminer wrote:
> the windows event
> object is FIFO fair nor starvatoin free..

I mean the windows event object is not FIFO fair nor starvation free..
0 new messages