FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

GPLv2 code in the Linux KPI? #154

Closed mjoras closed 7 years ago

mjoras commented 7 years ago

I noticed that there's a non-negligible amount of the Linux KPI that is straight up copied from various versions of Linux (e.g. kref_put_mutex), even though the file itself is supposedly licensed as BSD 2-clause.

Should we be replacing this code with strictly BSD-licensed code?

mattmacy commented 7 years ago

Inline functions less than 10 LOC are considered safe. And in general anything where the implementation is defined by the interface, i.e. couldn't be implemented any other way.

mjoras commented 7 years ago

Okay, good to know. Most of the reference counting/atomic functions are very short, so that's probably okay. I do wonder if it would be worth implementing Linux's newer refcount_t API independently and then defining kref in terms of that, as is done currently in Linux.