24 lines
405 B
C
24 lines
405 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "job_queue.h"
|
|
|
|
int main() {
|
|
struct job_queue q;
|
|
int a;
|
|
int c;
|
|
void* b = malloc(1);
|
|
job_queue_init(&q, 64);
|
|
|
|
a = 1;
|
|
job_queue_push(&q, &a);
|
|
c = 2;
|
|
job_queue_push(&q, &c);
|
|
|
|
job_queue_pop(&q, &b);
|
|
printf("%i\n",*((int *) b));
|
|
job_queue_pop(&q, &b);
|
|
printf("%i\n",*((int *) b));
|
|
|
|
job_queue_destroy(&q);
|
|
} |