Changeset 105 for trunk/hal/x86_64
- Timestamp:
- Jun 30, 2017, 9:07:32 AM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_atomic.c
r51 r105 1 1 /* 2 * hal_atomic.c - implementation of Generic Atomic Operations API for TSAR-MIPS32 3 * 4 * Author Alain Greiner (2016) 2 * hal_atomic.c - implementation of Generic Atomic Operations API for x86 5 3 * 6 * Copyright (c) UPMC Sorbonne Universites 7 * 8 * This file is part of ALMOS-MKH.. 4 * Copyright (c) 2017 Maxime Villard 9 5 * 10 * ALMOS-MKH. is free software; you can redistribute it and/or modify it 6 * This file is part of ALMOS-MKH. 7 * 8 * ALMOS-MKH is free software; you can redistribute it and/or modify it 11 9 * under the terms of the GNU General Public License as published by 12 10 * the Free Software Foundation; version 2.0 of the License. 13 11 * 14 * ALMOS-MKH .is distributed in the hope that it will be useful, but12 * ALMOS-MKH is distributed in the hope that it will be useful, but 15 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 28 26 int32_t val ) 29 27 { 30 x86_panic((char *)__func__);28 atomic_and_32((volatile uint32_t *)ptr, val); 31 29 } 32 30 … … 34 32 int32_t val ) 35 33 { 36 x86_panic((char *)__func__);34 atomic_or_32((volatile uint32_t *)ptr, val); 37 35 } 38 36 … … 40 38 int32_t val ) 41 39 { 42 x86_panic((char *)__func__); 43 return 0; 40 return atomic_add_32((volatile uint32_t *)ptr, val); 44 41 } 45 42 … … 48 45 uint32_t new ) 49 46 { 50 x86_panic((char *)__func__); 51 return 0; 47 return (atomic_cas_32((volatile uint32_t *)ptr, old, new) == old); 52 48 } 53 49 -
trunk/hal/x86_64/core/hal_remote.c
r98 r105 1 1 /* 2 * hal_remote.c - implementation of Generic Remote Access API for TSAR-MIPS32 3 * 4 * Authors : Mohammed Karaoui (2015) 5 * Alain Greiner (2016) 2 * hal_remote.c - implementation of Generic Remote Access API x86 6 3 * 7 * Copyright (c) UPMC Sorbonne Universites 8 * 9 * This file is part of ALMOS-MKH.. 4 * Copyright (c) 2017 Maxime Villard 10 5 * 11 * ALMOS-MKH. is free software; you can redistribute it and/or modify it 6 * This file is part of ALMOS-MKH. 7 * 8 * ALMOS-MKH is free software; you can redistribute it and/or modify it 12 9 * under the terms of the GNU General Public License as published by 13 10 * the Free Software Foundation; version 2.0 of the License. 14 11 * 15 * ALMOS-MKH .is distributed in the hope that it will be useful, but12 * ALMOS-MKH is distributed in the hope that it will be useful, but 16 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 17 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Note: See TracChangeset
for help on using the changeset viewer.