Ignore:
Timestamp:
Jul 31, 2014, 8:47:14 PM (10 years ago)
Author:
alain
Message:

1) Introducing the SBT barrier (Sliced Binary Tree)

in the barrier.h library.

2) Introducing a new remote_malloc.h library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/spin_lock.h

    r258 r368  
    44// Author   : alain greiner
    55// Copyright (c) UPMC-LIP6
     6///////////////////////////////////////////////////////////////////////////////////
     7// The spin_lock.c and spin_lock.h files are part of the GIET-VM nano-kernel.
     8// This  library implements a user-level lock.
     9// It is a simple binary lock, without waiting queue.
     10// The lock_acquire() and lock_release() functions do not require a system call.
     11// If the platform does not provide hardware cache coherence, the lock must be
     12// declared in a non cacheable segment,
     13//
     14// When a lock is defined in the mapping, it has not to be declared in the
     15// application code: it will be initialised in the boot phase,
     16// and the vobj_get_vbase() system call (defined in stdio.c and stdio.h files)
     17// can be used to get the virtual base address of the lock from it's name.
    618///////////////////////////////////////////////////////////////////////////////////
    719
     
    1123///////////////////////////////////////////////////////////////////////////////////
    1224//  lock structure
    13 // This is a simple binary lock (without waiting queue).
    1425///////////////////////////////////////////////////////////////////////////////////
    1526
    16 typedef struct giet_lock_s {
    17     char name[32];      // lock name
     27typedef struct giet_lock_s
     28{
     29    char name[60];      // lock name
    1830    unsigned int value; // taken if value != 0
    1931} giet_lock_t;
     
    2335//////////////////////////////////////////////////////////////////////////////
    2436
    25 void lock_acquire(giet_lock_t * lock);
    26 void lock_release(giet_lock_t * lock);
     37extern void lock_acquire(giet_lock_t * lock);
     38extern void lock_release(giet_lock_t * lock);
    2739
    2840#endif
Note: See TracChangeset for help on using the changeset viewer.