glibc - list and other data structures implementations
问题 I fill like my google searching skills are poor right now, couldn't find a list implementation in glibc, found hash and tree implementations but not a list one. Is there any glibc implementation for that? I don't want to reformat the linux kernel linked list macros and use them in userspace. 回答1: You can use insque(3) and remque(3) 回答2: There's /usr/include/sys/queue.h which contains various linked list variants.(more than the man page documents) Here's an example for a TAIL_QUEUE: Run it