Changeset f5f2768


Ignore:
Timestamp:
Feb 16, 2023, 4:37:25 PM (21 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
fbdfcd8
Parents:
1c80f20
git-author:
Peter A. Buhr <pabuhr@…> (02/16/23 16:34:37)
git-committer:
Peter A. Buhr <pabuhr@…> (02/16/23 16:37:25)
Message:

make _GNU_SOURCE default, change IO to use SOCKADDR_ARG and CONST_SOCKADDR_ARG, move sys/socket.h to first include because of anonymous naming problem

Files:
19 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r1c80f20 rf5f2768  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 14 21:55:12 2021
    13 // Update Count     : 467
     12// Last Modified On : Tue Feb 14 22:46:38 2023
     13// Update Count     : 470
    1414//
    1515
     
    444444
    445445        args[nargs++] = "-fexceptions";                                         // add exception flags (unconditionally)
     446        args[nargs++] = "-D_GNU_SOURCE";                                        // force gnu libraries
    446447
    447448        // add flags based on the type of compile
  • libcfa/src/concurrency/clib/cfathread.cfa

    r1c80f20 rf5f2768  
    1616// #define EPOLL_FOR_SOCKETS
    1717
     18#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
     19#include <string.h>
     20#include <errno.h>
     21
    1822#include "fstream.hfa"
    1923#include "locks.hfa"
     
    2529
    2630#include "cfathread.h"
    27 
    28 extern "C" {
    29                 #include <string.h>
    30                 #include <errno.h>
    31 }
    3231
    3332extern void ?{}(processor &, const char[], cluster &, thread$ *);
     
    471470}
    472471
     472#include <unistd.h>
     473
    473474#include <iofwd.hfa>
    474475
    475476extern "C" {
    476         #include <unistd.h>
    477         #include <sys/types.h>
    478         #include <sys/socket.h>
    479 
    480477        //--------------------
    481478        // IO operations
     
    487484                , protocol);
    488485        }
    489         int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len) {
     486        int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) {
    490487                return bind(socket, address, address_len);
    491488        }
     
    495492        }
    496493
    497         int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) {
     494        int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t *restrict address_len) {
    498495                #if defined(EPOLL_FOR_SOCKETS)
    499496                        int ret;
     
    512509        }
    513510
    514         int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len) {
     511        int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) {
    515512                #if defined(EPOLL_FOR_SOCKETS)
    516513                        int ret;
  • libcfa/src/concurrency/clib/cfathread.h

    r1c80f20 rf5f2768  
    99// Author           : Thierry Delisle
    1010// Created On       : Tue Sep 22 15:31:20 2020
    11 // Last Modified By :
    12 // Last Modified On :
    13 // Update Count     :
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Feb 16 12:00:32 2023
     13// Update Count     : 5
    1414//
    1515
    1616#if defined(__cforall) || defined(__cplusplus)
     17#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
     18#include <unistd.h>
     19#include <errno.h>
     20
    1721extern "C" {
    1822#endif
    19         #include <asm/types.h>
    20         #include <errno.h>
    21         #include <unistd.h>
    22 
    23 
    2423        //--------------------
    2524        // Basic types
     
    7372        } cfathread_mutexattr_t;
    7473        typedef struct cfathread_mutex * cfathread_mutex_t;
    75         int cfathread_mutex_init(cfathread_mutex_t *restrict mut, const cfathread_mutexattr_t *restrict attr) __attribute__((nonnull (1)));
     74        int cfathread_mutex_init(cfathread_mutex_t * restrict mut, const cfathread_mutexattr_t * restrict attr) __attribute__((nonnull (1)));
    7675        int cfathread_mutex_destroy(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
    7776        int cfathread_mutex_lock(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
     
    9190        //--------------------
    9291        // IO operations
    93         struct sockaddr;
    94         struct msghdr;
    9592        int cfathread_socket(int domain, int type, int protocol);
    96         int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len);
     93        int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len);
    9794        int cfathread_listen(int socket, int backlog);
    98         int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len);
    99         int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len);
     95        int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t * restrict address_len);
     96        int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len);
    10097        int cfathread_dup(int fildes);
    10198        int cfathread_close(int fildes);
  • libcfa/src/concurrency/coroutine.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 15 12:06:04 2020
    13 // Update Count     : 23
     12// Last Modified On : Thu Feb 16 15:34:46 2023
     13// Update Count     : 24
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#include "coroutine.hfa"
  • libcfa/src/concurrency/io.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#if defined(__CFA_DEBUG__)
  • libcfa/src/concurrency/io/call.cfa.in

    r1c80f20 rf5f2768  
    3131Prelude = """#define __cforall_thread__
    3232
     33#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
     34#include <unistd.h>
     35#include <errno.h>
     36#include <time.hfa>
     37
    3338#include "bits/defs.hfa"
    3439#include "kernel.hfa"
     
    4348        #include <assert.h>
    4449        #include <stdint.h>
    45         #include <errno.h>
    4650        #include <linux/io_uring.h>
    47 
    4851        #include "kernel/fwd.hfa"
    4952
     
    8285// I/O Forwards
    8386//=============================================================================================
    84 #include <time.hfa>
    85 
    86 // Some forward declarations
    87 #include <errno.h>
    88 #include <unistd.h>
    8987
    9088extern "C" {
    91         #include <asm/types.h>
    92         #include <sys/socket.h>
    93         #include <sys/syscall.h>
    94 
    9589#if defined(CFA_HAVE_PREADV2)
    9690        struct iovec;
     
    118112        extern ssize_t send(int sockfd, const void *buf, size_t len, int flags);
    119113        extern ssize_t recv(int sockfd, void *buf, size_t len, int flags);
    120         extern int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
    121         extern int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
    122114
    123115        extern int fallocate(int fd, int mode, off_t offset, off_t len);
     
    292284        }),
    293285        # CFA_HAVE_IORING_OP_ACCEPT
    294         Call('ACCEPT', 'int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)', {
     286        Call('ACCEPT', 'int accept4(int sockfd, __SOCKADDR_ARG addr, socklen_t * restrict addrlen, int flags)', {
    295287                'fd': 'sockfd',
    296288                'addr': '(uintptr_t)addr',
     
    299291        }),
    300292        # CFA_HAVE_IORING_OP_CONNECT
    301         Call('CONNECT', 'int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)', {
     293        Call('CONNECT', 'int connect(int sockfd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen)', {
    302294                'fd': 'sockfd',
    303295                'addr': '(uintptr_t)addr',
  • libcfa/src/concurrency/io/setup.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#if defined(__CFA_DEBUG__)
  • libcfa/src/concurrency/iofwd.hfa

    r1c80f20 rf5f2768  
    1616#pragma once
    1717
     18#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
    1819#include <unistd.h>
     20
    1921extern "C" {
    2022        #include <asm/types.h>
     
    5355struct iovec;
    5456struct msghdr;
    55 struct sockaddr;
    5657struct statx;
    5758struct epoll_event;
     
    100101extern ssize_t cfa_send(int sockfd, const void *buf, size_t len, int flags, __u64 submit_flags);
    101102extern ssize_t cfa_recv(int sockfd, void *buf, size_t len, int flags, __u64 submit_flags);
    102 extern int cfa_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags, __u64 submit_flags);
    103 extern int cfa_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen, __u64 submit_flags);
     103extern int cfa_accept4(int sockfd, __SOCKADDR_ARG addr, socklen_t * restrict addrlen, int flags, __u64 submit_flags);
     104extern int cfa_connect(int sockfd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen, __u64 submit_flags);
    104105extern int cfa_fallocate(int fd, int mode, off_t offset, off_t len, __u64 submit_flags);
    105106extern int cfa_posix_fadvise(int fd, off_t offset, off_t len, int advice, __u64 submit_flags);
     
    133134extern void async_send(io_future_t & future, int sockfd, const void *buf, size_t len, int flags, __u64 submit_flags);
    134135extern void async_recv(io_future_t & future, int sockfd, void *buf, size_t len, int flags, __u64 submit_flags);
    135 extern void async_accept4(io_future_t & future, int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags, __u64 submit_flags);
    136 extern void async_connect(io_future_t & future, int sockfd, const struct sockaddr *addr, socklen_t addrlen, __u64 submit_flags);
     136extern void async_accept4(io_future_t & future, int sockfd, __SOCKADDR_ARG addr, socklen_t * restrict addrlen, int flags, __u64 submit_flags);
     137extern void async_connect(io_future_t & future, int sockfd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen, __u64 submit_flags);
    137138extern void async_fallocate(io_future_t & future, int fd, int mode, off_t offset, off_t len, __u64 submit_flags);
    138139extern void async_posix_fadvise(io_future_t & future, int fd, off_t offset, off_t len, int advice, __u64 submit_flags);
  • libcfa/src/concurrency/kernel.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Nov 30 18:14:08 2022
    13 // Update Count     : 76
     12// Last Modified On : Mon Jan  9 08:42:05 2023
     13// Update Count     : 77
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918// #define __CFA_DEBUG_PRINT_RUNTIME_CORE__
  • libcfa/src/concurrency/kernel/cluster.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#include "bits/defs.hfa"
  • libcfa/src/concurrency/kernel/startup.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918// #define __CFA_DEBUG_PRINT_RUNTIME_CORE__
  • libcfa/src/concurrency/locks.cfa

    r1c80f20 rf5f2768  
    1616
    1717#define __cforall_thread__
    18 #define _GNU_SOURCE
    1918
    2019#include "locks.hfa"
  • libcfa/src/concurrency/monitor.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Thd Feb 23 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  4 07:55:14 2019
    13 // Update Count     : 10
     12// Last Modified On : Sun Jan  8 18:54:44 2023
     13// Update Count     : 11
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
     17//#define _GNU_SOURCE
    1818
    1919#include "monitor.hfa"
  • libcfa/src/concurrency/mutex.cfa

    r1c80f20 rf5f2768  
    1212// Created On       : Fri May 25 01:37:11 2018
    1313// Last Modified By : Peter A. Buhr
    14 // Last Modified On : Wed Dec  4 09:16:39 2019
    15 // Update Count     : 1
     14// Last Modified On : Sun Jan  8 18:54:28 2023
     15// Update Count     : 2
    1616//
    1717
    1818#define __cforall_thread__
    19 #define _GNU_SOURCE
     19//#define _GNU_SOURCE
    2020
    2121#include "mutex.hfa"
  • libcfa/src/concurrency/preemption.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 17 11:18:57 2022
    13 // Update Count     : 59
     12// Last Modified On : Mon Jan  9 08:42:59 2023
     13// Update Count     : 60
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918// #define __CFA_DEBUG_PRINT_PREEMPTION__
  • libcfa/src/concurrency/pthread.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#include <signal.h>
     
    3534struct pthread_values{
    3635        inline Seqable;
    37         void* value;
     36        void * value;
    3837        bool in_use;
    3938};
     
    5554};
    5655
    57 static void ?{}(pthread_keys& k){
     56static void ?{}(pthread_keys& k) {
    5857        k.threads{};
    5958}
     
    6261static pthread_keys cfa_pthread_keys_storage[PTHREAD_KEYS_MAX] __attribute__((aligned (16)));
    6362
    64 static void init_pthread_storage(){
    65         for (int i = 0; i < PTHREAD_KEYS_MAX; i++){
     63static void init_pthread_storage() {
     64        for ( int i = 0; i < PTHREAD_KEYS_MAX; i++) {
    6665                cfa_pthread_keys_storage[i]{};
    6766        }
     
    9695
    9796/* condvar helper routines */
    98 static void init(pthread_cond_t* pcond){
     97static void init(pthread_cond_t * pcond) {
    9998        static_assert(sizeof(pthread_cond_t) >= sizeof(cfa2pthr_cond_var_t),"sizeof(pthread_t) < sizeof(cfa2pthr_cond_var_t)");
    100         cfa2pthr_cond_var_t* _cond = (cfa2pthr_cond_var_t*)pcond;
     99        cfa2pthr_cond_var_t * _cond = (cfa2pthr_cond_var_t*)pcond;
    101100        ?{}(*_cond);
    102101}
    103102
    104 static cfa2pthr_cond_var_t* get(pthread_cond_t* pcond){
     103static cfa2pthr_cond_var_t * get(pthread_cond_t * pcond) {
    105104        static_assert(sizeof(pthread_cond_t) >= sizeof(cfa2pthr_cond_var_t),"sizeof(pthread_t) < sizeof(cfa2pthr_cond_var_t)");
    106105        return (cfa2pthr_cond_var_t*)pcond;
    107106}
    108107
    109 static void destroy(pthread_cond_t* cond){
     108static void destroy(pthread_cond_t* cond) {
    110109        static_assert(sizeof(pthread_cond_t) >= sizeof(cfa2pthr_cond_var_t),"sizeof(pthread_t) < sizeof(cfa2pthr_cond_var_t)");
    111110        ^?{}(*get(cond));
     
    116115
    117116/* mutex helper routines */
    118 static void mutex_check(pthread_mutex_t* t){
     117static void mutex_check(pthread_mutex_t* t) {
    119118        // Use double check to improve performance.
    120119        // Check is safe on x86; volatile prevents compiler reordering
     
    136135
    137136
    138 static void init(pthread_mutex_t* plock){
     137static void init(pthread_mutex_t* plock) {
    139138        static_assert(sizeof(pthread_mutex_t) >= sizeof(simple_owner_lock),"sizeof(pthread_mutex_t) < sizeof(simple_owner_lock)");
    140139        simple_owner_lock* _lock = (simple_owner_lock*)plock;
     
    142141}
    143142
    144 static simple_owner_lock* get(pthread_mutex_t* plock){
     143static simple_owner_lock* get(pthread_mutex_t* plock) {
    145144        static_assert(sizeof(pthread_mutex_t) >= sizeof(simple_owner_lock),"sizeof(pthread_mutex_t) < sizeof(simple_owner_lock)");
    146145        return (simple_owner_lock*)plock;
    147146}
    148147
    149 static void destroy(pthread_mutex_t* plock){
     148static void destroy(pthread_mutex_t* plock) {
    150149        static_assert(sizeof(pthread_mutex_t) >= sizeof(simple_owner_lock),"sizeof(pthread_mutex_t) < sizeof(simple_owner_lock)");
    151150        ^?{}(*get(plock));
     
    173172};
    174173
    175 static cfaPthread_attr_t* get(const pthread_attr_t* attr){
     174static cfaPthread_attr_t* get(const pthread_attr_t* attr) {
    176175        static_assert(sizeof(pthread_attr_t) >= sizeof(cfaPthread_attr_t),"sizeof(pthread_attr_t) < sizeof(cfaPthread_attr_t)");
    177176        return (cfaPthread_attr_t*)attr;
     
    207206/* thread part routines */
    208207//  cfaPthread entry point
    209 void main(cfaPthread& _thread) with(_thread){
    210         joinval =  start_routine(start_arg);
     208void main( cfaPthread & _thread ) with( _thread ) {
     209        joinval = start_routine( start_arg );
    211210        isTerminated = true;
    212211}
    213212
    214 static cfaPthread *lookup( pthread_t p ){
     213static cfaPthread * lookup( pthread_t p ) {
    215214        static_assert(sizeof(pthread_t) >= sizeof(cfaPthread*),"sizeof(pthread_t) < sizeof(cfaPthread*)");
    216215        return (cfaPthread*)p;
     
    221220        pthread_keys* key;
    222221        bool destcalled = true;
    223         if (values != NULL){
     222        if (values != NULL) {
    224223                for ( int attempts = 0; attempts < PTHREAD_DESTRUCTOR_ITERATIONS && destcalled ; attempts += 1 ) {
    225224                        destcalled = false;
    226225                        lock(key_lock);
    227                         for (int i = 0; i < PTHREAD_KEYS_MAX; i++){
     226                        for ( int i = 0; i < PTHREAD_KEYS_MAX; i++) {
    228227                                // for each valid key
    229                                 if ( values[i].in_use){
     228                                if ( values[i].in_use) {
    230229                                        value = &values[i];
    231230                                        key = &cfa_pthread_keys[i];
     
    234233                                        // if  a  key  value  has  a  non-NULL  destructor pointer,  and  the  thread  has  a  non-NULL  value associated with that key,
    235234                                        // the value of the key is set to NULL, and then the function pointed to is called with the previously associated value as its sole argument.
    236                                         if (value->value != NULL && key->destructor != NULL){
     235                                        if (value->value != NULL && key->destructor != NULL) {
    237236                                                unlock(key_lock);
    238237                                                key->destructor(value->value); // run destructor
     
    249248}
    250249
    251 static void ^?{}(cfaPthread & mutex t){
     250static void ^?{}(cfaPthread & mutex t) {
    252251        // delete pthread local storage
    253252        pthread_values * values = t.pthreadData;
     
    260259        // set up user thread stackSize
    261260        cfaPthread_attr_t * attr = get(_attr);
    262         ((thread&)t){ attr ? attr->stacksize: DEFAULT_STACK_SIZE };
     261        ((thread&)t) { attr ? attr->stacksize: DEFAULT_STACK_SIZE };
    263262
    264263        // initialize _thread & cfaPthread id
     
    365364        int pthread_create(pthread_t * _thread, const pthread_attr_t * attr, void *(*start_routine)(void *), void * arg) libcfa_public __THROW {
    366365                cfaPthread *t = alloc();
    367                 (*t){_thread, attr, start_routine, arg};
     366                (*t) {_thread, attr, start_routine, arg};
    368367                return 0;
    369368        }
     
    415414                _thread->joinval = status;  // set return value
    416415                _thread->isTerminated = 1;  // set terminated flag
    417                 cancel_stack((pthread_exit_exp){&exp_vt});
     416                cancel_stack((pthread_exit_exp) {&exp_vt});
    418417        }   //pthread_exit_
    419418
     
    436435                check_nonnull(_mutex);
    437436                simple_owner_lock* _lock = get(_mutex);
    438                 if (_lock->owner != NULL){
     437                if (_lock->owner != NULL) {
    439438                        return EBUSY;
    440439                }
     
    454453                check_nonnull(_mutex);
    455454                simple_owner_lock* _lock = get(_mutex);
    456                 if (_lock->owner != active_thread()){
     455                if (_lock->owner != active_thread()) {
    457456                        return EPERM;
    458457                } // current thread does not hold the mutex
     
    464463                check_nonnull(_mutex);
    465464                simple_owner_lock* _lock = get(_mutex);
    466                 if (_lock->owner != active_thread() && _lock->owner != NULL){
     465                if (_lock->owner != active_thread() && _lock->owner != NULL) {
    467466                        return EBUSY;
    468467                }   // if mutex is owned
     
    567566                // if current thread's pthreadData is NULL; initialize it
    568567                pthread_values* values;
    569                 if (t->pthreadData == NULL){
     568                if (t->pthreadData == NULL) {
    570569                        values = anew( PTHREAD_KEYS_MAX);
    571570                        t->pthreadData = values;
    572                         for (int i = 0;i < PTHREAD_KEYS_MAX; i++){
     571                        for ( int i = 0;i < PTHREAD_KEYS_MAX; i++) {
    573572                                t->pthreadData[i].in_use = false;
    574573                        }   // for
     
    875874        //######################### Parallelism #########################
    876875
    877         int pthread_setaffinity_np( pthread_t /* __th */, size_t /* __cpusetsize */, __const cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
    878                 abort( "pthread_setaffinity_np" );
    879         } // pthread_setaffinity_np
    880 
    881         int pthread_getaffinity_np( pthread_t /* __th */, size_t /* __cpusetsize */, cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
    882                 abort( "pthread_getaffinity_np" );
    883         } // pthread_getaffinity_np
    884 
    885         int pthread_attr_setaffinity_np( pthread_attr_t * /* __attr */, size_t /* __cpusetsize */, __const cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
    886                 abort( "pthread_attr_setaffinity_np" );
    887         } // pthread_attr_setaffinity_np
    888 
    889         int pthread_attr_getaffinity_np( __const pthread_attr_t * /* __attr */, size_t /* __cpusetsize */, cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
    890                 abort( "pthread_attr_getaffinity_np" );
    891         } // pthread_attr_getaffinity_np
     876        // int pthread_setaffinity_np( pthread_t /* __th */, size_t /* __cpusetsize */, __const cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
     877        //      abort( "pthread_setaffinity_np" );
     878        // } // pthread_setaffinity_np
     879
     880        // int pthread_getaffinity_np( pthread_t /* __th */, size_t /* __cpusetsize */, cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
     881        //      abort( "pthread_getaffinity_np" );
     882        // } // pthread_getaffinity_np
     883
     884        // int pthread_attr_setaffinity_np( pthread_attr_t * /* __attr */, size_t /* __cpusetsize */, __const cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
     885        //      abort( "pthread_attr_setaffinity_np" );
     886        // } // pthread_attr_setaffinity_np
     887
     888        // int pthread_attr_getaffinity_np( __const pthread_attr_t * /* __attr */, size_t /* __cpusetsize */, cpu_set_t * /* __cpuset */ ) libcfa_public __THROW {
     889        //      abort( "pthread_attr_getaffinity_np" );
     890        // } // pthread_attr_getaffinity_np
    892891
    893892        //######################### Cancellation #########################
  • libcfa/src/concurrency/ready_queue.cfa

    r1c80f20 rf5f2768  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918// #define __CFA_DEBUG_PRINT_READY_QUEUE__
  • libcfa/src/concurrency/thread.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec 11 20:56:54 2022
    13 // Update Count     : 102
     12// Last Modified On : Mon Jan  9 08:42:33 2023
     13// Update Count     : 103
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918#include "thread.hfa"
  • libcfa/src/limits.cfa

    r1c80f20 rf5f2768  
    1010// Created On       : Wed Apr  6 18:06:52 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan  5 22:27:40 2023
    13 // Update Count     : 84
     12// Last Modified On : Sun Jan  8 18:53:17 2023
     13// Update Count     : 86
    1414//
    1515
    16 #define _GNU_SOURCE                                                                             // access long double M_*l in math.h
     16// need _GNU_SOURCE to access long double M_*l in math.h
    1717#include <limits.h>
    1818#include <float.h>
Note: See TracChangeset for help on using the changeset viewer.