Changeset 596d65c in mainline for uspace/lib/c/generic/futex.c


Ignore:
Timestamp:
2010-04-17T01:15:39Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3292623
Parents:
e35bf88
Message:

coding style change (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/futex.c

    re35bf88 r596d65c  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
    3535#include <futex.h>
     
    4040/** Initialize futex counter.
    4141 *
    42  * @param futex         Futex.
    43  * @param val           Initialization value.
     42 * @param futex Futex.
     43 * @param val   Initialization value.
     44 *
    4445 */
    4546void futex_initialize(futex_t *futex, int val)
     
    5051/** Try to down the futex.
    5152 *
    52  * @param futex         Futex.
    53  * @return              Non-zero if the futex was acquired.
    54  * @return              Zero if the futex was not acquired.
     53 * @param futex Futex.
     54 *
     55 * @return Non-zero if the futex was acquired.
     56 * @return Zero if the futex was not acquired.
     57 *
    5558 */
    5659int futex_trydown(futex_t *futex)
     
    6164/** Down the futex.
    6265 *
    63  * @param futex         Futex.
    64  * @return              ENOENT if there is no such virtual address.
    65  * @return              Zero in the uncontended case.
    66  * @return              Otherwise one of ESYNCH_OK_ATOMIC or ESYNCH_OK_BLOCKED.
     66 * @param futex Futex.
     67 *
     68 * @return ENOENT if there is no such virtual address.
     69 * @return Zero in the uncontended case.
     70 * @return Otherwise one of ESYNCH_OK_ATOMIC or ESYNCH_OK_BLOCKED.
     71 *
    6772 */
    6873int futex_down(futex_t *futex)
     
    7075        if ((atomic_signed_t) atomic_predec(futex) < 0)
    7176                return __SYSCALL1(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count);
    72 
     77       
    7378        return 0;
    7479}
     
    7681/** Up the futex.
    7782 *
    78  * @param futex         Futex.
    79  * @return              ENOENT if there is no such virtual address.
    80  * @return              Zero in the uncontended case.
     83 * @param futex Futex.
     84 *
     85 * @return ENOENT if there is no such virtual address.
     86 * @return Zero in the uncontended case.
     87 *
    8188 */
    8289int futex_up(futex_t *futex)
     
    8491        if ((atomic_signed_t) atomic_postinc(futex) < 0)
    8592                return __SYSCALL1(SYS_FUTEX_WAKEUP, (sysarg_t) &futex->count);
    86                
     93       
    8794        return 0;
    8895}
Note: See TracChangeset for help on using the changeset viewer.