Changeset 290553a


Ignore:
Timestamp:
Oct 14, 2020, 10:57:02 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0b18db7
Parents:
b3f9684c
Message:

Changed some defines to constants with last fix

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/coroutine.cfa

    rb3f9684c r290553a  
    9292
    9393// minimum feasible stack size in bytes
    94 #define MinStackSize 1000
     94static const size_t MinStackSize = 1000;
    9595extern size_t __page_size;                              // architecture pagesize HACK, should go in proper runtime singleton
    9696
  • libcfa/src/concurrency/io/call.cfa.in

    rb3f9684c r290553a  
    4747        #include "kernel/fwd.hfa"
    4848
    49         #if defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_IO_DRAIN) && defined(CFA_HAVE_IOSQE_ASYNC)
    50                 #define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_IO_DRAIN | IOSQE_ASYNC)
    51         #elif defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_ASYNC)
    52                 #define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_ASYNC)
    53         #elif defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_IO_DRAIN)
    54                 #define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_IO_DRAIN)
    55         #elif defined(CFA_HAVE_IOSQE_IO_DRAIN) && defined(CFA_HAVE_IOSQE_ASYNC)
    56                 #define REGULAR_FLAGS (IOSQE_IO_DRAIN | IOSQE_ASYNC)
    57         #elif defined(CFA_HAVE_IOSQE_FIXED_FILE)
    58                 #define REGULAR_FLAGS (IOSQE_FIXED_FILE)
    59         #elif defined(CFA_HAVE_IOSQE_IO_DRAIN)
    60                 #define REGULAR_FLAGS (IOSQE_IO_DRAIN)
    61         #elif defined(CFA_HAVE_IOSQE_ASYNC)
    62                 #define REGULAR_FLAGS (IOSQE_ASYNC)
    63         #else
    64                 #define REGULAR_FLAGS (0)
    65         #endif
    66 
    67         #if defined(CFA_HAVE_IOSQE_IO_LINK) && defined(CFA_HAVE_IOSQE_IO_HARDLINK)
    68                 #define LINK_FLAGS (IOSQE_IO_LINK | IOSQE_IO_HARDLINK)
    69         #elif defined(CFA_HAVE_IOSQE_IO_LINK)
    70                 #define LINK_FLAGS (IOSQE_IO_LINK)
    71         #elif defined(CFA_HAVE_IOSQE_IO_HARDLINK)
    72                 #define LINK_FLAGS (IOSQE_IO_HARDLINK)
    73         #else
    74                 #define LINK_FLAGS (0)
    75         #endif
    76 
    77         #if defined(CFA_HAVE_SPLICE_F_FD_IN_FIXED)
    78                 #define SPLICE_FLAGS (SPLICE_F_FD_IN_FIXED)
    79         #else
    80                 #define SPLICE_FLAGS (0)
    81         #endif
     49        static const __u8 REGULAR_FLAGS = 0
     50                #if defined(CFA_HAVE_IOSQE_FIXED_FILE)
     51                        | IOSQE_FIXED_FILE
     52                #endif
     53                #if defined(CFA_HAVE_IOSQE_IO_DRAIN)
     54                        | IOSQE_IO_DRAIN
     55                #endif
     56                #if defined(CFA_HAVE_IOSQE_ASYNC)
     57                        | IOSQE_ASYNC
     58                #endif
     59        ;
     60
     61        static const __u32 LINK_FLAGS = 0
     62                #if defined(CFA_HAVE_IOSQE_IO_LINK)
     63                        | IOSQE_IO_LINK
     64                #endif
     65                #if defined(CFA_HAVE_IOSQE_IO_HARDLINK)
     66                        | IOSQE_IO_HARDLINK
     67                #endif
     68        ;
     69
     70        static const __u32 SPLICE_FLAGS = 0
     71                #if defined(CFA_HAVE_SPLICE_F_FD_IN_FIXED)
     72                        | SPLICE_F_FD_IN_FIXED
     73                #endif
     74        ;
    8275
    8376        extern [* struct io_uring_sqe, __u32] __submit_alloc( struct __io_data & ring, __u64 data );
  • libcfa/src/concurrency/snzi.hfa

    rb3f9684c r290553a  
    3636static inline void depart( __snzi_node_t & );
    3737
    38 #define __snzi_half -1
     38static const int __snzi_half = -1;
    3939
    4040//--------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.