Ignore:
Timestamp:
Jul 22, 2012, 12:06:11 PM (12 years ago)
Author:
karaoui
Message:

updating libs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/libs/libsrl/srl_lock.h

    r160 r178  
    2121 */
    2222
    23 #include "srl_public_types.h"
    24 #include "stdio.h"
     23#include "spin_lock.h"
    2524
    26 typedef struct {
    27         unsigned int lock;
    28 }srl_lock_t;
    29 
    30 #define SRL_LOCK_INITIALIZER { 0 }
     25typedef giet_lock_t* srl_lock_t;
    3126
    3227/**
     
    3530   @param lock The lock object
    3631 */
    37 int srl_lock_lock( srl_lock_t lock );
     32#define srl_lock_lock(lock) lock_acquire(lock);
    3833
    3934/**
    40    @this releases a l-ock.
     35   @this releases a lock.
    4136
    4237   @param lock The lock object
    4338 */
    44 void srl_lock_unlock( srl_lock_t lock );
     39#define srl_lock_unlock( lock ) lock_release(lock);
    4540
    4641/**
     
    5146   @return 0 if the lock was taken successfully
    5247 */
    53 int srl_lock_try_lock( srl_lock_t lock );
     48#define srl_lock_try_lock( lock ) lock_try_acquire( lock );
    5449
    5550#endif
Note: See TracChangeset for help on using the changeset viewer.