This commit is contained in:
Nikolaj
2021-10-27 13:50:32 +02:00
parent 456adc7611
commit 282a9a0f77
5 changed files with 21 additions and 18 deletions

View File

@ -5,12 +5,20 @@
int main() {
struct job_queue q;
int b = 5;
int a;
int c;
void* b = malloc(1);
job_queue_init(&q, 64);
job_queue_push(&q, &b);
void* a = malloc(1);
job_queue_pop(&q, &a);
printf("%i\n",*((int *) a));
printf("esauc\n");
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);
}