This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v8 3/8] nptl: Add C11 threads call_once functions


On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
+#define ONCE_FLAG_INIT 0
+
  typedef unsigned long int thrd_t;
  typedef int (*thrd_start_t) (void*);
+typedef int __ONCE_ALIGNMENT once_flag;

__ONCE_ALIGNMENT is not expressible in C11, so I think you should turn once_flag into a struct with a suitably aligned member, and change ONCE_FLAG_INIT as well (into a compound literal).

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]