Changeset 4119

Show
Ignore:
Timestamp:
01/31/10 08:06:30 (1 month ago)
Author:
proski
Message:

Use sema_init() instead of init_MUTEX()

init_MUTEX() is missing on kernels with realtime patches. Besides,
init_MUTEX is a confusing name, since it initializes a semaphore,
whereas newer kernels have real mutexes as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/branches/madwifi-0.9.3/ath/if_athvar.h

    r4110 r4119  
    738738#endif 
    739739/* Protects the device from concurrent accesses */ 
    740 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     740#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    741741#define ATH_LOCK_DESTROY(_sc) 
    742742#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock) 
  • madwifi/branches/madwifi-0.9.4/ath/if_athvar.h

    r4110 r4119  
    750750#endif 
    751751/* Protects the device from concurrent accesses */ 
    752 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     752#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    753753#define ATH_LOCK_DESTROY(_sc) 
    754754#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock) 
  • madwifi/branches/madwifi-dfs/ath/if_athvar.h

    r4110 r4119  
    994994#endif 
    995995/* Protects the device from concurrent accesses */ 
    996 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     996#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    997997#define ATH_LOCK_DESTROY(_sc) 
    998998#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock) 
  • madwifi/branches/madwifi-hal-0.10.5.6/ath/if_athvar.h

    r4110 r4119  
    999999#endif 
    10001000/* Protects the device from concurrent accesses */ 
    1001 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     1001#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    10021002#define ATH_LOCK_DESTROY(_sc) 
    10031003#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock) 
  • madwifi/branches/madwifi-hal-0.9.30.13/ath/if_athvar.h

    r4110 r4119  
    999999#endif 
    10001000/* Protects the device from concurrent accesses */ 
    1001 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     1001#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    10021002#define ATH_LOCK_DESTROY(_sc) 
    10031003#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock) 
  • madwifi/branches/madwifi-hal-testing/ath/if_athvar.h

    r4110 r4119  
    999999#endif 
    10001000/* Protects the device from concurrent accesses */ 
    1001 #define ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock
     1001#define ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1
    10021002#define ATH_LOCK_DESTROY(_sc) 
    10031003#define ATH_LOCK(_sc)                   down(&(_sc)->sc_lock)