Add readme

This commit is contained in:
2025-01-21 19:47:52 +03:00
parent 075196fcb6
commit 997ed5132d
2 changed files with 131 additions and 25 deletions

View File

@@ -78,20 +78,6 @@ int main(int argc, char** argv)
}
}
int* ii = malloc(sizeof(int));
if(ii == NULL)
{
abort();
}
*ii = 0;
int excode = ptQueuePush(qOut, ii, errbuf);
if(excode)
{
printf("Unable to push 0: %s\n", errbuf);
abort();
}
ptQueueElem* tailIn = qIn->tail;
while (1)
@@ -108,22 +94,22 @@ int main(int argc, char** argv)
int* pass = malloc(sizeof(int));
if(pass != NULL)
if(pass == NULL)
{
*pass = *code;
int excode = ptQueuePush(qOut, pass, errbuf);
if(excode)
{
abort();
}
abort();
}
if(*code == 0)
*pass = *code;
int excode = ptQueuePush(qOut, pass, errbuf);
if(excode)
{
abort();
}
if(*code == 4095)
{
free(payload);
break;
}
free(payload);
ptQueueElem* newTail = atomic_load(&(tailIn->nextEl));
if (newTail == NULL)
{
@@ -131,8 +117,31 @@ int main(int argc, char** argv)
}
free(tailIn);
tailIn = newTail;
excode = ptQueuePush(qOut, payload, errbuf);
if(excode)
{
printf("Unable to push: %s\n", errbuf);
abort();
}
}
int* ii = malloc(sizeof(int));
if(ii == NULL)
{
abort();
}
*ii = 0;
int excode = ptQueuePush(qOut, ii, errbuf);
if(excode)
{
printf("Unable to push 0: %s\n", errbuf);
abort();
}
pthread_join(tid, NULL);
return 0;
}