The art of programming

Computer programming

The practice of programming, How to design programs, SICP, and Elements of programming.
Reentrancy

Functional programming

CPS in C
Continuation-passing style

programming principles

Programming principles
High cohesion low coupling

Design pattern

Linux kernel design patterns
Linux Kernel Programming Patterns

IPC

Busy waiting vs blocking

Project engineering

kernel asm/asm-generic
asm stands for arch specific macros(FIXME).

Coding style

GNU Coding Standards
比如GNU coding standards, Linux kernel coding style, Shell coding standard
* Label
It is considered to be safer that the label reflect what happens at the
destination, and not the reason for reaching the label. –Julia

Good taste

remove_list_entry(entry)
{
// The “indirect” pointer points to the
// address of the thing we’ll update
indirect = &head;

// Walk the list, looking for the thing that
// points to the entry we want to remove

while ((*indirect) != entry)
indirect = &(*indirect)->next;

// .. and just remove it
*indirect = entry->next;
}

remove_list_entry(entry)
{
prev = NULL;
walk = head;

// Walk the list

while (walk != entry) {
prev = walk;
walk = walk->next;
}

// Remove the entry by updating the
// head or the previous entry

if (!prev)
head = entry->next;
else
prev->head = entry->next;
}