On Sun, Aug 14, 2022 at 06:24:58AM -0400, Elad Lahav wrote: > On 2022-08-14 06:21, Elad Lahav wrote: > > +#elif defined (__QNX__) > > + uintptr_t runmask; > > + int ret; > > + > > + runmask = (1UL << cpu); > > + ret = ThreadCtl(_NTO_TCTL_RUNMASK, (void *)runmask); > > + if (ret) { > > + perror("sched_setaffinity"); > > + abort(); > > + } > > Argh, I've just noticed the mix of tabs and spaces here. What's the protocol > for updating a patch? Since I have not pulled it in yet, just resend it with "v2" after the "PATCH" in the subject line. But given that we are adding another OS type, it would be good to have a more organized way of dealing with this. Those #ifdefs are OK at first, but get ugly quickly. Would you be willing to propose something that co-locates the OS-specific code? For example, one file for the QNX code and a parallel file for Linux/POSIX code? Maybe a .h file, or maybe a separate .c file. That way, the same functions names are invoked and the code specific to a given OS is easily located. Thoughts? Thanx, Paul