Changeset 17 for trunk/hal/generic/hal_atomic.h
- Timestamp:
- May 11, 2017, 7:49:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_atomic.h
r16 r17 1 1 /* 2 2 * hal_atomic.h - Generic Atomic Operations API definition. 3 * 3 * 4 4 * Authors Alain Greiner (2016) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites 7 * 7 * 8 8 * This file is part of ALMOS-MKH. 9 9 * … … 29 29 30 30 ////////////////////////////////////////////////////////////////////////////////////////// 31 // Generic Atomic Operations API (implementation in hal_atomic.c) 31 // Generic Atomic Operations API (implementation in hal_atomic.c) 32 32 // 33 // Atomic read-then-write operations depend s on the CPU instruction set.33 // Atomic read-then-write operations depend on the CPU instruction set. 34 34 // ALMOS-MKH uses the following generic API. 35 35 ////////////////////////////////////////////////////////////////////////////////////////// … … 40 40 ***************************************************************************************** 41 41 * @ ptr : pointer on the shared variable 42 * @ val : mask value 42 * @ val : mask value 43 43 ****************************************************************************************/ 44 44 void hal_atomic_and( uint32_t * ptr, … … 85 85 86 86 /***************************************************************************************** 87 * This NON blocking function makes an atomic Compare-And-Swap on a 32 bits unsigned int 87 * This NON blocking function makes an atomic Compare-And-Swap on a 32 bits unsigned int 88 88 * shared variable, returning a Boolean to indicate both success and atomicity. 89 89 ***************************************************************************************** … … 98 98 99 99 /***************************************************************************************** 100 * This non blocking function makes an atomic Test-if-zero-And-Set on a 32 bits unsigned 100 * This non blocking function makes an atomic Test-if-zero-And-Set on a 32 bits unsigned 101 101 * int shared variable, returning a Boolean to indicate both success and atomicity. 102 102 ***************************************************************************************** … … 105 105 * @ return true if (current == 0) and (access is atomic) 106 106 ****************************************************************************************/ 107 bool_t hal_atomic_test_set( uint32_t * ptr, 107 bool_t hal_atomic_test_set( uint32_t * ptr, 108 108 uint32_t val ); 109 109
Note: See TracChangeset
for help on using the changeset viewer.