3 ms·
Some constructs from the kernel are maybe not so relevant to use in userspace. Spinlocks are great in the kernel where we can just mask interrupts. Not so fant
by colonwqbang 5y ago
Some constructs from the kernel are maybe not so relevant to use in userspace.
Spinlocks are great in the kernel where we can just mask interrupts. Not so fantastic in userspace.
Intrusive linked structures are necessary in the kernel since they let us manipulate collections without allocating. But they are also less convenient. Etc.
However, I'm sure there are lots of things which could be useful in both places. I have from time to time toyed with the idea of porting the kernel "standard library" API into userspace. Maybe something like that already exists?
- klysm 5y agoI'm not aware of a version of it available in user space, but at least there is a useful subset which could probably be extracted. At the same time though, having two consumers of the API means more thought needs to go into changes.