SemaCondvar module version 1.0 is here...

Discussion in 'C Programming' started by aminer, Jun 13, 2013.

  1. aminer

    aminer Guest

    Hello,

    SemaCondvar module version 1.0 is here...


    SemaCondvar and SemaMonitor are new and portable synchronization objects...


    Author: Amine Moulay Ramdane.

    Description: SemaCondvar and SemaCondvar are a new synchronization
    objects that combines a semaphore and a condition variable, it only uses
    an event object and a critical section , so it's fast.

    If you don't want the signal to be lost if the threads are not
    waiting, just pass True to the state argument of to the constructor,
    if you pass False to the state argument of the construtor so the signals
    will be lost if the threads are not waiting.

    Please take a look a the test.pas Object Pascal demo inside the zipfile,
    compile and run it...


    The implemented methods are:

    function wait(mstime:longword=INFINITE):boolean;
    procedure signal();overload;
    procedure signal_all();
    procedure signal(nbr:integer);overload;
    function WaitersBlocked:integer;


    Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

    Operating Systems: Windows, Mac OSX , Linux , Unix...


    Required FPC switches: -O3 -Sd -dFPC -dFreePascal

    -Sd for delphi mode....


    You can download SemaCondvar from:

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


    Thank you,
    Amine Moulay Ramdane.
     
    aminer, Jun 13, 2013
    #1
    1. Advertisements

  2. aminer

    aminer Guest

    ...

    Hello,

    Sorry for my english...

    Here is again the description:

    Description: SemaCondvar and SemaMonitor are new and portable
    synchronization objects that combine the characteristics of a semaphore
    and a condition variable, they only use an event object and a critical
    section ,
    so they are fast.


    You can download SemaCondvar from:

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


    Thank you,
    Amine Moulay Ramdane.
     
    aminer, Jun 13, 2013
    #2
    1. Advertisements

  3. aminer <> writes:
    > SemaCondvar module version 1.0 is here...

    [...]
    > Please take a look a the test.pas Object Pascal demo inside the zipfile,
    > compile and run it...

    [...]

    Why would an Object Pascal module be of interest on comp.lang.c?

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Jun 13, 2013
    #3
  4. aminer

    zebra9forC Guest

    Keith Thompson wrote:
    > aminer <> writes:
    >> SemaCondvar module version 1.0 is here...

    > [...]
    >> Please take a look a the test.pas Object Pascal demo inside the
    >> zipfile, compile and run it...

    > [...]
    >
    > Why would an Object Pascal module be of interest on comp.lang.c?


    Because it represents an era where there was a departure from 1960s-style
    programming. What was just a promise back then, can be had today, but not
    with C. The point is that a lot of people use C to "hedge bets". That is,
    they choose the wrong tool in the short term thinking that someday it will
    pay off, but usually doesn't. While C is good in certain fields in the hands
    of those who can harness it, today, one must ask why if those C coders are
    so good, they don't just create the *perfect* tool for the job on the fly.
     
    zebra9forC, Jun 15, 2013
    #4
  5. aminer

    Öö Tiib Guest

    On Saturday, 15 June 2013 05:21:49 UTC+3, zebra9forC wrote:
    > Keith Thompson wrote:
    > > Why would an Object Pascal module be of interest on comp.lang.c?

    >
    > Because it represents an era where there was a departure from 1960s-style
    > programming.


    Some things are changed but not much ... LISP (1958) is still alive and
    kicking. Programming language is a tool. When tool is new then there are
    lot of people who misuse it. Usage style gets better over time with
    experience. Pascal was way more popular 20 years ago than now so it
    apparently does something that does not fit with that modern style.

    > What was just a promise back then, can be had today, but not
    > with C. The point is that a lot of people use C to "hedge bets". That is,
    > they choose the wrong tool in the short term thinking that someday it
    > will pay off, but usually doesn't.


    What promise? 3-th level languages? Prolog? It did not happen. We still have
    2 levels of programming languages: A) that instruct computers (assembler)
    B) that describe run-time behavior (all the rest). C is just bit ahead of
    the pack thanks to large libraries, good performance and availability of
    good specialists.

    > While C is good in certain fields in the hands of those who can harness
    > it, today, one must ask why if those C coders are so good, they don't
    > just create the *perfect* tool for the job on the fly.


    Strange question. Most perfect tool for throwing a throw-away program
    together on the fly that I know is Python interpreter. Couple of C coders
    lead by Guido van Rossum did write it in C. For me it looks really well
    written C. I am bad judge being mostly C++ fan, but yeah if there will
    be even more perfect tool then chances are that it will be again written
    in C.
     
    Öö Tiib, Jun 15, 2013
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. V Green
    Replies:
    0
    Views:
    996
    V Green
    Feb 5, 2008
  2. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,108
    PA Bear [MS MVP]
    Feb 5, 2008
  3. MowGreen [MVP]
    Replies:
    5
    Views:
    2,133
    PA Bear [MS MVP]
    Feb 9, 2008
  4. mdev
    Replies:
    0
    Views:
    1,997
  5. aminer
    Replies:
    2
    Views:
    206
    aminer
    Jun 13, 2013
Loading...

Share This Page