Ignore:
Timestamp:
Oct 5, 2018, 12:21:52 AM (4 years ago)
Author:
alain
Message:

Cosmetic.

Location:
trunk/libs/libsemaphore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/libsemaphore/semaphore.c

    r469 r573  
    11/*
    2  * pthread.c - User leve <semaphore> library implementation.
     2 * pthread.c - User level <semaphore> library implementation.
    33 *
    44 * Author     Alain Greiner (2016,2017,2018)
  • trunk/libs/libsemaphore/semaphore.h

    r469 r573  
    22 * pthread.h - User level <semaphore> library definition.
    33 *
    4  * Author     Alain Greiner (2016,2017)
     4 * Author     Alain Greiner (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3333/*********************************************************************************************
    3434 * This function initializes an unnamed semaphore.
    35  * Process shared semaphores are not supported in this implementation.
    3635 * Initializing a semaphore that has already been initialized results in undefined behavior.
    3736 *********************************************************************************************
     
    4645
    4746/*********************************************************************************************
    48  * This blocking function locks a semaphore. It decrements the semaphore pointed to by <sem>.
     47 * This blocking function takes a semaphore. It decrements the semaphore pointed to by <sem>.
    4948 * If the semaphore's value is greater than zero, then the decrement proceeds, and the
    50  * function returns immediately. If the semaphore currently has the value zero, then the call
    51  * blocks until it becomes possible to perform the decrement.
     49 * function returns immediately. If the semaphore currently has the value zero, the calling
     50 * thread registers in the associated waiting queue, blocks and deschedules.
     51 * It will be unblocked by another thread when it becomes possible to perform the decrement.
    5252 *********************************************************************************************
    5353 * @ sem         : [in]  pointer on semaphore.
     
    5757
    5858/*********************************************************************************************
    59  * This function unlocks a semaphore. It increments the semaphore pointed to by <sem>.
     59 * This function releases a semaphore. It increments the semaphore pointed to by <sem>.
    6060 * If the semaphore's value consequently becomes greater than zero, then another thread
    61  * blocked in a sem_wait() call will be woken up and proceed to lock the semaphore.
     61 * blocked in a sem_wait() call will be woken up to try to take the semaphore.
    6262 *********************************************************************************************
    6363 * @ sem         : [in]  pointer on semaphore.
Note: See TracChangeset for help on using the changeset viewer.