All pastes #354305 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-13 22:03 UTC
rendered paste body

void insert_job(queue* q, void (*f)(void *), void *d) {
	node* n = (node*)malloc( sizeof(node) );
	n->function = f;
	printf("%x - %x\n", f, n->function);
	n->data = d;
	printf("%x - %x\n", d, n.data);
	n->next = NULL;
	printf("h1\n");
	printf("%x - %x\n", q->first, n);
	if(q->first == 0) {
		printf("h2\n");
		q->first = n;
		printf("h3\n");
	}
	printf("h4\n");
	q->last->next = n;
	q->last = n;
	printf("%x\n", q->first);
	printf("%x\n", q->last);
}