source: soft/giet_vm/giet_libs/libsrl/srl_lock.h @ 794

Last change on this file since 794 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.1 KB
Line 
1/*
2 * This file is part of DSX, development environment for static
3 * SoC applications.
4 *
5 * This file is distributed under the terms of the GNU General Public
6 * License.
7 *
8 * Copyright (c) 2006, Nicolas Pouillon, <nipo@ssji.net>
9 *     Laboratoire d'informatique de Paris 6 / ASIM, France
10 *
11 *  $Id$
12 */
13
14#ifndef SRL_LOCK_H_
15#define SRL_LOCK_H_
16
17/**
18 * @file
19 * @module{SRL}
20 * @short Lock operations
21 */
22
23#include "spin_lock.h"
24
25typedef giet_lock_t * srl_lock_t;
26
27/**
28   @this takes a lock.
29
30   @param lock The lock object
31 */
32#define srl_lock_lock(lock) lock_acquire(lock);
33
34/**
35   @this releases a lock.
36
37   @param lock The lock object
38 */
39#define srl_lock_unlock( lock ) lock_release(lock);
40
41/**
42   @this tries to take a lock. @this returns whether the lock was
43   actually taken.
44
45   @param lock The lock object
46   @return 0 if the lock was taken successfully
47 */
48#define srl_lock_try_lock( lock ) lock_try_acquire( lock );
49
50#endif
51
52
53// Local Variables:
54// tab-width: 4
55// c-basic-offset: 4
56// c-file-offsets:((innamespace . 0)(inline-open . 0))
57// indent-tabs-mode: nil
58// End:
59// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
60
Note: See TracBrowser for help on using the repository browser.