Skip to content

Instantly share code, notes, and snippets.

@wayling
wayling / list.c
Created October 12, 2012 06:29
Naive thread-safe linked list implementation
#include <stdlib.h>
#include "list.h"
/* Naive linked list implementation */
list *
list_create()
{
list *l = (list *) malloc(sizeof(list));
l->count = 0;