Ignore:
Timestamp:
Apr 30, 2019, 2:51:11 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
98d4df9
Parents:
986e260
Message:

Added atomic operations on pointers and fixed some mistakes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/sync-builtins.cf

    r986e260 rc64e979  
    323323_Bool __sync_bool_compare_and_swap_16(volatile unsigned __int128 *, unsigned __int128, unsigned __int128,...);
    324324#endif
     325forall(dtype T) _Bool __sync_bool_compare_and_swap(T * volatile *, T *, T*, ...);
    325326
    326327char __sync_val_compare_and_swap(volatile char *, char, char,...);
     
    348349unsigned __int128 __sync_val_compare_and_swap_16(volatile unsigned __int128 *, unsigned __int128, unsigned __int128,...);
    349350#endif
     351forall(dtype T) T * __sync_val_compare_and_swap(T * volatile *, T *, T*,...);
    350352
    351353char __sync_lock_test_and_set(volatile char *, char,...);
     
    434436#endif
    435437
    436 char __atomic_exchange_n(volatile char *, volatile char *, int);
     438char __atomic_exchange_n(volatile char *, char, int);
    437439char __atomic_exchange_1(volatile char *, char, int);
    438440void __atomic_exchange(volatile char *, volatile char *, volatile char *, int);
    439 signed char __atomic_exchange_n(volatile signed char *, volatile signed char *, int);
     441signed char __atomic_exchange_n(volatile signed char *, signed char, int);
    440442signed char __atomic_exchange_1(volatile signed char *, signed char, int);
    441443void __atomic_exchange(volatile signed char *, volatile signed char *, volatile signed char *, int);
    442 unsigned char __atomic_exchange_n(volatile unsigned char *, volatile unsigned char *, int);
     444unsigned char __atomic_exchange_n(volatile unsigned char *, unsigned char, int);
    443445unsigned char __atomic_exchange_1(volatile unsigned char *, unsigned char, int);
    444446void __atomic_exchange(volatile unsigned char *, volatile unsigned char *, volatile unsigned char *, int);
    445 signed short __atomic_exchange_n(volatile signed short *, volatile signed short *, int);
     447signed short __atomic_exchange_n(volatile signed short *, signed short, int);
    446448signed short __atomic_exchange_2(volatile signed short *, signed short, int);
    447449void __atomic_exchange(volatile signed short *, volatile signed short *, volatile signed short *, int);
    448 unsigned short __atomic_exchange_n(volatile unsigned short *, volatile unsigned short *, int);
     450unsigned short __atomic_exchange_n(volatile unsigned short *, unsigned short, int);
    449451unsigned short __atomic_exchange_2(volatile unsigned short *, unsigned short, int);
    450452void __atomic_exchange(volatile unsigned short *, volatile unsigned short *, volatile unsigned short *, int);
    451 signed int __atomic_exchange_n(volatile signed int *, volatile signed int *, int);
     453signed int __atomic_exchange_n(volatile signed int *, signed int, int);
    452454signed int __atomic_exchange_4(volatile signed int *, signed int, int);
    453455void __atomic_exchange(volatile signed int *, volatile signed int *, volatile signed int *, int);
    454 unsigned int __atomic_exchange_n(volatile unsigned int *, volatile unsigned int *, int);
     456unsigned int __atomic_exchange_n(volatile unsigned int *, unsigned int, int);
    455457unsigned int __atomic_exchange_4(volatile unsigned int *, unsigned int, int);
    456458void __atomic_exchange(volatile unsigned int *, volatile unsigned int *, volatile unsigned int *, int);
    457 signed long long int __atomic_exchange_n(volatile signed long long int *, volatile signed long long int *, int);
     459signed long long int __atomic_exchange_n(volatile signed long long int *, signed long long int, int);
    458460signed long long int __atomic_exchange_8(volatile signed long long int *, signed long long int, int);
    459461void __atomic_exchange(volatile signed long long int *, volatile signed long long int *, volatile signed long long int *, int);
    460 unsigned long long int __atomic_exchange_n(volatile unsigned long long int *, volatile unsigned long long int *, int);
     462unsigned long long int __atomic_exchange_n(volatile unsigned long long int *, unsigned long long int, int);
    461463unsigned long long int __atomic_exchange_8(volatile unsigned long long int *, unsigned long long int, int);
    462464void __atomic_exchange(volatile unsigned long long int *, volatile unsigned long long int *, volatile unsigned long long int *, int);
    463465#if defined(__SIZEOF_INT128__)
    464 signed __int128 __atomic_exchange_n(volatile signed __int128 *, volatile signed __int128 *, int);
     466signed __int128 __atomic_exchange_n(volatile signed __int128 *, signed __int128, int);
    465467signed __int128 __atomic_exchange_16(volatile signed __int128 *, signed __int128, int);
    466468void __atomic_exchange(volatile signed __int128 *, volatile signed __int128 *, volatile signed __int128 *, int);
    467 unsigned __int128 __atomic_exchange_n(volatile unsigned __int128 *, volatile unsigned __int128 *, int);
     469unsigned __int128 __atomic_exchange_n(volatile unsigned __int128 *, unsigned __int128, int);
    468470unsigned __int128 __atomic_exchange_16(volatile unsigned __int128 *, unsigned __int128, int);
    469471void __atomic_exchange(volatile unsigned __int128 *, volatile unsigned __int128 *, volatile unsigned __int128 *, int);
    470472#endif
     473forall(dtype T) T * __atomic_exchange_n(T * volatile *, T *, int);
     474forall(dtype T) void __atomic_exchange(T * volatile *, T * volatile *, T * volatile *, int);
    471475
    472476_Bool __atomic_load_n(const volatile _Bool *, int);
     
    507511void __atomic_load(const volatile unsigned __int128 *, volatile unsigned __int128 *, int);
    508512#endif
     513forall(dtype T) T * __atomic_load_n(T * const volatile *, int);
     514forall(dtype T) void __atomic_load(T * const volatile *, T **, int);
    509515
    510516_Bool __atomic_compare_exchange_n(volatile char *, char *, char, _Bool, int, int);
     
    543549_Bool __atomic_compare_exchange   (volatile unsigned __int128 *, unsigned __int128 *, unsigned __int128 *, _Bool, int, int);
    544550#endif
     551forall(dtype T) _Bool __atomic_compare_exchange_n (T * volatile *, T **, T*, _Bool, int, int);
     552forall(dtype T) _Bool __atomic_compare_exchange   (T * volatile *, T **, T**, _Bool, int, int);
    545553
    546554void __atomic_store_n(volatile _Bool *, _Bool, int);
     
    581589void __atomic_store(volatile unsigned __int128 *, unsigned __int128 *, int);
    582590#endif
     591forall(dtype T) void __atomic_store_n(T * volatile *, T *, int);
     592forall(dtype T) void __atomic_store(T * volatile *, T **, int);
    583593
    584594char __atomic_add_fetch  (volatile char *, char, int);
Note: See TracChangeset for help on using the changeset viewer.