LWN.net Logo

Glibc and the kernel user-space API

Glibc and the kernel user-space API

Posted Feb 1, 2013 0:01 UTC (Fri) by wahern (subscriber, #37304)
In reply to: Glibc and the kernel user-space API by jwarnica
Parent article: Glibc and the kernel user-space API

I think the argument is that it's more trouble than it's worth. That is, more time and anxiety is spent providing the wrapper than that spent by the few people actually using the syscall writing their own wrapper. It's not so much about maintenance, but the upfront work and pile of junk wrappers.

Writing your own wrapper is utterly trivial, unless you're a masochist and are intent on supporting multi-arch systems. For syscalls like gettid, there's absolutely nothing wrong with just writing syscall(SYS_gettid). It can even be cleaner if you're writing portable apps, because you can just `#ifdef SYS_gettid', rather than testing for the existence of glibc or __linux, or having to bring autotools into the equation (if it's not already).


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds