Changeset 05d02c6 for libcfa/src


Ignore:
Timestamp:
Mar 15, 2021, 2:10:34 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e5e5af9
Parents:
ea837e94 (diff), 36fbaeca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src/concurrency/clib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/clib/cfathread.cfa

    rea837e94 r05d02c6  
    105105        //--------------------
    106106        // Thread
    107         int cfathread_create( cfathread_t * handle, cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
     107        int cfathread_create( cfathread_t * handle, const cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
    108108                cluster * cl = attr ? attr->cl : active_cluster();
    109109                cfathread_t thrd = alloc();
     
    120120                }
    121121                return 0;
     122        }
     123
     124        int cfathread_get_errno(void) {
     125                return errno;
    122126        }
    123127
  • libcfa/src/concurrency/clib/cfathread.h

    rea837e94 r05d02c6  
    3030        typedef struct cluster * cfathread_cluster_t;
    3131
    32         int cfathread_cluster_create(cfathread_cluster_t * cluster) __attribute__((nonnull(1)));
     32        int cfathread_cluster_create(cfathread_cluster_t * cluster);
    3333        cfathread_cluster_t cfathread_cluster_self(void);
    3434        int cfathread_cluster_add_worker(cfathread_cluster_t cluster, pthread_t* tid, void (*init_routine) (void *), void * arg);
     
    4343
    4444        int cfathread_attr_init(cfathread_attr_t * attr) __attribute__((nonnull (1)));
    45         static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1))) { return 0; }
    46         static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1))) { return 0; }
    47         static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1))) { attr->cl = cl; return 0; }
     45        static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1)));
     46        static inline int cfathread_attr_destroy(cfathread_attr_t * attr) { return 0; }
     47        static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1)));
     48        static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) { return 0; }
     49        static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1)));
     50        static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) { attr->cl = cl; return 0; }
    4851
    4952        //--------------------
     
    5255        typedef struct cfathread_object * cfathread_t;
    5356
    54         int cfathread_create( cfathread_t * h, cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
     57        int cfathread_create( cfathread_t * h, const cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
    5558        int cfathread_join( cfathread_t, void ** retval );
    5659
Note: See TracChangeset for help on using the changeset viewer.