source: soft/giet_vm/giet_libs/spin_lock.h @ 305

Last change on this file since 305 was 258, checked in by alain, 11 years ago

This is a major release, including a deep restructuration of code.
The main evolutions are

  • use of the Tsar preloader to load the GIET boot-loader from disk
  • introduction of a FAT32 file system library,
  • use of this fat32 library by the boot-loader to load the map.bin data structure, and the various .elf files
  • reorganisation of drivers (one file per peripheral).
  • introduction of drivers for new peripherals: vci_chbuf_dma and vci_multi_ahci.
  • introduction of a new physical memory allocator in the boot code.

This release has been tested on the tsar_generic_iob architecture,
for the two following mappings: 4c_1p_iob_four.xml and 4c_1p_iob_sort.xml

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1//////////////////////////////////////////////////////////////////////////////////
2// File     : spin_lock.h         
3// Date     : 01/04/2012
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_SPIN_LOCK_H_
9#define _GIET_SPIN_LOCK_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12//  lock structure
13// This is a simple binary lock (without waiting queue).
14///////////////////////////////////////////////////////////////////////////////////
15
16typedef struct giet_lock_s {
17    char name[32];      // lock name
18    unsigned int value; // taken if value != 0
19} giet_lock_t;
20
21//////////////////////////////////////////////////////////////////////////////
22//  access functions
23//////////////////////////////////////////////////////////////////////////////
24
25void lock_acquire(giet_lock_t * lock);
26void lock_release(giet_lock_t * lock);
27
28#endif
29
30// Local Variables:
31// tab-width: 4
32// c-basic-offset: 4
33// c-file-offsets:((innamespace . 0)(inline-open . 0))
34// indent-tabs-mode: nil
35// End:
36// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
37
Note: See TracBrowser for help on using the repository browser.