Hi Johannes, On Thu, Jul 1, 2021 at 3:42 PM Johannes Thoma <johan...@johannesthoma.com> wrote: > The approach we use attempts to minimize patches to the original > source code and use a compatibility layer to map the Linux > interfaces (and behaviour) to the Windows NT interfaces (and > behaviour). Since we use Microsoft's C compiler to build the > project we need to patch some compiler specific things (like > MS C does not know gcc's typeof) > My advice would be to keep the compat.h header (and related > files) so that the changes to the Linux sources are kept > at a minimum.
I have no desire nor plans to do this at all in any way, shape, or form. The compat.h header is going away, and the whole project will be transformed into native NT code, without Linuxisms. That is why I sent the email to the cocci mailing list -- because we're going to transform every inch of the code base. The goal is to have a totally separate development path, to intentionally allow the implementations to diverge and integrate well with the unique kernel paradigms of each respective kernel. We've done that throughout the project - to OpenBSD, FreeBSD, Userspace in two languages, and now to NT. In each place, we prefer native implementations that make use of native runtime facilities. We even take that approach with UIs, using native OS toolkits, rather than trying to use something like Qt or Electron. So, the compat.h stuff is definitely going away. With that said, it looks like you've built up an impressive translation layer! (FYI, from brief perusal it looks like your RCU implementation has some issues; I'll send you a link to mine when it's ready -- it's fully lockless like Linux's. And your get_random_bytes looks like a security vulnerability. We can talk about NT-specific stuff offlist though.) Jason _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci