[haiku-gsoc] Re: Licensing questions
- From: Hamish Morrison <hamishm53@xxxxxxxxx>
- To: haiku-gsoc@xxxxxxxxxxxxx
- Date: Wed, 7 Jun 2017 21:21:19 +0100
On 07/06/2017 21:13, Vivek Roy wrote:
Why is there all the net/*.h and netinet/*.h? Why do you need those for
a linked list?
Like I said, poor header hygeine -- where programmers don't take care
over what they've included. They may just have copy and pasted some
other header and changed the contents.
The only thing I can see in there is WRITE_ONCE in __list_del, which is
a macro to make the write to the next pointer atomic (this is so readers
can traverse the list while a writer is deleting from the list without
needing to take a lock).
But this is itself a Linux feature - so you should implement that in the
KPI too. You can see it here:
https://github.com/freebsd/freebsd/blob/master/sys/compat/linuxkpi/common/include/linux/compiler.h
So for a lot of code - especially this data structure stuff - you should
be able to just import it without any changes (because it will only
depend on other Linux KPI files).
Of course a lot of things will need porting - but don't just assume
everything does because it includes some random header files :)
Other related posts: