source: rtems/cpukit/libdrvmgr/drvmgr_lock.c @ f4794b6

Last change on this file since f4794b6 was f4794b6, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 24, 2018 at 1:40:07 PM

drvmgr: Really fix API mutex usage

  • Property mode set to 100644
File size: 652 bytes
Line 
1/* Driver Manager Internal locking implementation
2 *
3 * COPYRIGHT (c) 2009 Cobham Gaisler AB.
4 *
5 * The license and distribution terms for this file may be
6 * found in the file LICENSE in this distribution or at
7 * http://www.rtems.org/license/LICENSE.
8 */
9
10#include <drvmgr/drvmgr.h>
11#include "drvmgr_internal.h"
12#include <rtems/score/sysstate.h>
13
14void _DRV_Manager_Lock( void )
15{
16  if ( !_System_state_Is_before_initialization( _System_state_Get() ) ) {
17    _API_Mutex_Lock( &drvmgr.lock );
18  }
19}
20
21void _DRV_Manager_Unlock(void)
22{
23  if ( !_System_state_Is_before_initialization( _System_state_Get() ) ) {
24    _API_Mutex_Unlock( &drvmgr.lock );
25  }
26}
Note: See TracBrowser for help on using the repository browser.