Skip to content

Instantly share code, notes, and snippets.

@kangear
kangear / list.h
Last active August 29, 2015 14:15
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#include <stdio.h>
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.