Sample Code Neeeded for SemEvStart - VxWorks

This is a discussion on Sample Code Neeeded for SemEvStart - VxWorks ; Hi, Can some please tell me how to use SemEvStart .? If u can show me by sample code it vl be nice. Thanks in Advance....

+ Reply to Thread
Results 1 to 2 of 2

Thread: Sample Code Neeeded for SemEvStart

  1. Sample Code Neeeded for SemEvStart

    Hi,
    Can some please tell me how to use SemEvStart .?
    If u can show me by sample code it vl be nice.
    Thanks in Advance.



  2. Re: Sample Code Neeeded for SemEvStart

    SemEvStart associates a event,a semaphore and a task.It notification the task about the semaphore by triggering the event.This notification event
    gets tiggered based on the option specifed during the SemEvStart .
    The event, thus triggered can be caught using the eventReceive().
    The user events supported by vxworks are VXEV01 to VXEV24.

    Here goes the sample code ...


    #include "eventLib.h"
    SemEvStart(semID ,VXEVnn,options);

    semId : Id returned by the semcreate()
    VXEVnn : VXEV01 to VXEV24
    options :

    EVENTS_SEND_ONCE (0x1) :tells the semaphore to send the events one time only.
    - Specify if another task can register itself while the current task is still registered. If so, the current task registration is overwritten without any warning. The option
    EVENTS_ALLOW_OVERWRITE (0x2) : allows subsequent registrations to overwrite the current one.
    - Specify if events are to be sent at the time of the registration in the case the semaphore is free. The option
    EVENTS_SEND_IF_FREE (0x4) : tells the registration process to send events if the semaphore is free.
    EVENTS_OPTIONS_NONE : If none of these options are to be used


    Thanks,
    RChandran

+ Reply to Thread