Changes in / [98d4df9:686f731]


Ignore:
Files:
2 edited

Legend:

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

    r98d4df9 r686f731  
    323323_Bool __sync_bool_compare_and_swap_16(volatile unsigned __int128 *, unsigned __int128, unsigned __int128,...);
    324324#endif
    325 forall(dtype T) _Bool __sync_bool_compare_and_swap(T * volatile *, T *, T*, ...);
    326325
    327326char __sync_val_compare_and_swap(volatile char *, char, char,...);
     
    349348unsigned __int128 __sync_val_compare_and_swap_16(volatile unsigned __int128 *, unsigned __int128, unsigned __int128,...);
    350349#endif
    351 forall(dtype T) T * __sync_val_compare_and_swap(T * volatile *, T *, T*,...);
    352350
    353351char __sync_lock_test_and_set(volatile char *, char,...);
     
    436434#endif
    437435
    438 char __atomic_exchange_n(volatile char *, char, int);
     436char __atomic_exchange_n(volatile char *, volatile char *, int);
    439437char __atomic_exchange_1(volatile char *, char, int);
    440438void __atomic_exchange(volatile char *, volatile char *, volatile char *, int);
    441 signed char __atomic_exchange_n(volatile signed char *, signed char, int);
     439signed char __atomic_exchange_n(volatile signed char *, volatile signed char *, int);
    442440signed char __atomic_exchange_1(volatile signed char *, signed char, int);
    443441void __atomic_exchange(volatile signed char *, volatile signed char *, volatile signed char *, int);
    444 unsigned char __atomic_exchange_n(volatile unsigned char *, unsigned char, int);
     442unsigned char __atomic_exchange_n(volatile unsigned char *, volatile unsigned char *, int);
    445443unsigned char __atomic_exchange_1(volatile unsigned char *, unsigned char, int);
    446444void __atomic_exchange(volatile unsigned char *, volatile unsigned char *, volatile unsigned char *, int);
    447 signed short __atomic_exchange_n(volatile signed short *, signed short, int);
     445signed short __atomic_exchange_n(volatile signed short *, volatile signed short *, int);
    448446signed short __atomic_exchange_2(volatile signed short *, signed short, int);
    449447void __atomic_exchange(volatile signed short *, volatile signed short *, volatile signed short *, int);
    450 unsigned short __atomic_exchange_n(volatile unsigned short *, unsigned short, int);
     448unsigned short __atomic_exchange_n(volatile unsigned short *, volatile unsigned short *, int);
    451449unsigned short __atomic_exchange_2(volatile unsigned short *, unsigned short, int);
    452450void __atomic_exchange(volatile unsigned short *, volatile unsigned short *, volatile unsigned short *, int);
    453 signed int __atomic_exchange_n(volatile signed int *, signed int, int);
     451signed int __atomic_exchange_n(volatile signed int *, volatile signed int *, int);
    454452signed int __atomic_exchange_4(volatile signed int *, signed int, int);
    455453void __atomic_exchange(volatile signed int *, volatile signed int *, volatile signed int *, int);
    456 unsigned int __atomic_exchange_n(volatile unsigned int *, unsigned int, int);
     454unsigned int __atomic_exchange_n(volatile unsigned int *, volatile unsigned int *, int);
    457455unsigned int __atomic_exchange_4(volatile unsigned int *, unsigned int, int);
    458456void __atomic_exchange(volatile unsigned int *, volatile unsigned int *, volatile unsigned int *, int);
    459 signed long long int __atomic_exchange_n(volatile signed long long int *, signed long long int, int);
     457signed long long int __atomic_exchange_n(volatile signed long long int *, volatile signed long long int *, int);
    460458signed long long int __atomic_exchange_8(volatile signed long long int *, signed long long int, int);
    461459void __atomic_exchange(volatile signed long long int *, volatile signed long long int *, volatile signed long long int *, int);
    462 unsigned long long int __atomic_exchange_n(volatile unsigned long long int *, unsigned long long int, int);
     460unsigned long long int __atomic_exchange_n(volatile unsigned long long int *, volatile unsigned long long int *, int);
    463461unsigned long long int __atomic_exchange_8(volatile unsigned long long int *, unsigned long long int, int);
    464462void __atomic_exchange(volatile unsigned long long int *, volatile unsigned long long int *, volatile unsigned long long int *, int);
    465463#if defined(__SIZEOF_INT128__)
    466 signed __int128 __atomic_exchange_n(volatile signed __int128 *, signed __int128, int);
     464signed __int128 __atomic_exchange_n(volatile signed __int128 *, volatile signed __int128 *, int);
    467465signed __int128 __atomic_exchange_16(volatile signed __int128 *, signed __int128, int);
    468466void __atomic_exchange(volatile signed __int128 *, volatile signed __int128 *, volatile signed __int128 *, int);
    469 unsigned __int128 __atomic_exchange_n(volatile unsigned __int128 *, unsigned __int128, int);
     467unsigned __int128 __atomic_exchange_n(volatile unsigned __int128 *, volatile unsigned __int128 *, int);
    470468unsigned __int128 __atomic_exchange_16(volatile unsigned __int128 *, unsigned __int128, int);
    471469void __atomic_exchange(volatile unsigned __int128 *, volatile unsigned __int128 *, volatile unsigned __int128 *, int);
    472470#endif
    473 forall(dtype T) T * __atomic_exchange_n(T * volatile *, T *, int);
    474 forall(dtype T) void __atomic_exchange(T * volatile *, T * volatile *, T * volatile *, int);
    475471
    476472_Bool __atomic_load_n(const volatile _Bool *, int);
     
    511507void __atomic_load(const volatile unsigned __int128 *, volatile unsigned __int128 *, int);
    512508#endif
    513 forall(dtype T) T * __atomic_load_n(T * const volatile *, int);
    514 forall(dtype T) void __atomic_load(T * const volatile *, T **, int);
    515509
    516510_Bool __atomic_compare_exchange_n(volatile char *, char *, char, _Bool, int, int);
     
    549543_Bool __atomic_compare_exchange   (volatile unsigned __int128 *, unsigned __int128 *, unsigned __int128 *, _Bool, int, int);
    550544#endif
    551 forall(dtype T) _Bool __atomic_compare_exchange_n (T * volatile *, T **, T*, _Bool, int, int);
    552 forall(dtype T) _Bool __atomic_compare_exchange   (T * volatile *, T **, T**, _Bool, int, int);
    553545
    554546void __atomic_store_n(volatile _Bool *, _Bool, int);
     
    589581void __atomic_store(volatile unsigned __int128 *, unsigned __int128 *, int);
    590582#endif
    591 forall(dtype T) void __atomic_store_n(T * volatile *, T *, int);
    592 forall(dtype T) void __atomic_store(T * volatile *, T **, int);
    593583
    594584char __atomic_add_fetch  (volatile char *, char, int);
  • tests/builtins/sync.cfa

    r98d4df9 r686f731  
    1111        volatile __int128 * vp16 = 0; __int128 * rp16 = 0; __int128 v16 = 0;
    1212        #endif
    13         struct type * volatile * vpp = 0; struct type ** rpp = 0; struct type * vp = 0;
    1413
    1514        { char ret; ret = __sync_fetch_and_add(vp1, v1); }
     
    181180        { _Bool ret; ret = __sync_bool_compare_and_swap_16(vp16, v16,v16); }
    182181        #endif
    183         { _Bool ret; ret = __sync_bool_compare_and_swap(vpp, vp, vp); }
    184182
    185183        { char ret; ret = __sync_val_compare_and_swap(vp1, v1, v1); }
     
    195193        { __int128 ret; ret = __sync_val_compare_and_swap_16(vp16, v16,v16); }
    196194        #endif
    197         { struct type * ret; ret = __sync_val_compare_and_swap(vpp, vp, vp); }
    198 
    199195
    200196        { char ret; ret = __sync_lock_test_and_set(vp1, v1); }
     
    234230        { __atomic_clear(vp1, v1); }
    235231
    236         { char ret; ret = __atomic_exchange_n(vp1, v1, __ATOMIC_SEQ_CST); }
     232        { char ret; ret = __atomic_exchange_n(vp1, &v1, __ATOMIC_SEQ_CST); }
    237233        { char ret; ret = __atomic_exchange_1(vp1, v1, __ATOMIC_SEQ_CST); }
    238234        { char ret; __atomic_exchange(vp1, &v1, &ret, __ATOMIC_SEQ_CST); }
    239         { short ret; ret = __atomic_exchange_n(vp2, v2, __ATOMIC_SEQ_CST); }
     235        { short ret; ret = __atomic_exchange_n(vp2, &v2, __ATOMIC_SEQ_CST); }
    240236        { short ret; ret = __atomic_exchange_2(vp2, v2, __ATOMIC_SEQ_CST); }
    241237        { short ret; __atomic_exchange(vp2, &v2, &ret, __ATOMIC_SEQ_CST); }
    242         { int ret; ret = __atomic_exchange_n(vp4, v4, __ATOMIC_SEQ_CST); }
     238        { int ret; ret = __atomic_exchange_n(vp4, &v4, __ATOMIC_SEQ_CST); }
    243239        { int ret; ret = __atomic_exchange_4(vp4, v4, __ATOMIC_SEQ_CST); }
    244240        { int ret; __atomic_exchange(vp4, &v4, &ret, __ATOMIC_SEQ_CST); }
    245         { long long int ret; ret = __atomic_exchange_n(vp8, v8, __ATOMIC_SEQ_CST); }
     241        { long long int ret; ret = __atomic_exchange_n(vp8, &v8, __ATOMIC_SEQ_CST); }
    246242        { long long int ret; ret = __atomic_exchange_8(vp8, v8, __ATOMIC_SEQ_CST); }
    247243        { long long int ret; __atomic_exchange(vp8, &v8, &ret, __ATOMIC_SEQ_CST); }
    248244        #if defined(__SIZEOF_INT128__)
    249         { __int128 ret; ret = __atomic_exchange_n(vp16, v16, __ATOMIC_SEQ_CST); }
     245        { __int128 ret; ret = __atomic_exchange_n(vp16, &v16, __ATOMIC_SEQ_CST); }
    250246        { __int128 ret; ret = __atomic_exchange_16(vp16, v16, __ATOMIC_SEQ_CST); }
    251247        { __int128 ret; __atomic_exchange(vp16, &v16, &ret, __ATOMIC_SEQ_CST); }
    252248        #endif
    253         { struct type * ret; ret = __atomic_exchange_n(vpp, vp, __ATOMIC_SEQ_CST); }
    254         { struct type * ret; __atomic_exchange(vpp, &vp, &ret, __ATOMIC_SEQ_CST); }
    255249
    256250        { char ret; ret = __atomic_load_n(vp1, __ATOMIC_SEQ_CST); }
     
    271265        { __int128 ret; __atomic_load(vp16, &ret, __ATOMIC_SEQ_CST); }
    272266        #endif
    273         { struct type * ret; ret = __atomic_load_n(vpp, __ATOMIC_SEQ_CST); }
    274         { struct type * ret; __atomic_load(vpp, &ret, __ATOMIC_SEQ_CST); }
    275267
    276268        { _Bool ret; ret = __atomic_compare_exchange_n(vp1, rp1, v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
     
    291283        { _Bool ret; ret = __atomic_compare_exchange(vp16, rp16, &v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    292284        #endif
    293         { _Bool ret; ret = __atomic_compare_exchange_n(vpp, rpp, vp, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    294         { _Bool ret; ret = __atomic_compare_exchange(vpp, rpp, &vp, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    295285
    296286        { __atomic_store_n(vp1, v1, __ATOMIC_SEQ_CST); }
     
    311301        { __atomic_store(vp16, &v16, __ATOMIC_SEQ_CST); }
    312302        #endif
    313         { __atomic_store_n(vpp, vp, __ATOMIC_SEQ_CST); }
    314         { __atomic_store(vpp, &vp, __ATOMIC_SEQ_CST); }
    315303
    316304        { char ret; ret = __atomic_add_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
Note: See TracChangeset for help on using the changeset viewer.