Changeset 98b52e3 in rtems for cpukit/libdrvmgr/drvmgr_lock.c


Ignore:
Timestamp:
Dec 4, 2017, 7:48:10 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bc5b56a
Parents:
61bd8cd6
git-author:
Sebastian Huber <sebastian.huber@…> (12/04/17 07:48:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/06/17 06:13:04)
Message:

drvmgr: Use API mutex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdrvmgr/drvmgr_lock.c

    r61bd8cd6 r98b52e3  
    1414void _DRV_Manager_Lock(void)
    1515{
    16         rtems_semaphore_obtain(drvmgr.lock, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     16        _API_Mutex_Lock(&drvmgr.lock);
    1717}
    1818
    1919void _DRV_Manager_Unlock(void)
    2020{
    21         rtems_semaphore_release(drvmgr.lock);
     21        _API_Mutex_Unlock(&drvmgr.lock);
    2222}
    23 
    24 int _DRV_Manager_Init_Lock(void)
    25 {
    26         int rc;
    27 
    28         rc = rtems_semaphore_create(
    29                 rtems_build_name('D', 'R', 'V', 'M'),
    30                 1,
    31                 RTEMS_DEFAULT_ATTRIBUTES,
    32                 0,
    33                 &drvmgr.lock);
    34         if (rc != RTEMS_SUCCESSFUL)
    35                 return -1;
    36         return 0;
    37 }
Note: See TracChangeset for help on using the changeset viewer.