Hi all,
I am uncertain of what the difference is between pthreads for win32 and for linux.
Can anyone please tell me the differences between them.
Are the functions the same?
And how do...
Type: Posts; User: philipsan
Hi all,
I am uncertain of what the difference is between pthreads for win32 and for linux.
Can anyone please tell me the differences between them.
Are the functions the same?
And how do...
I made this code now:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>
#include <sys/types.h>
Yeah, I dont create any threads, because they are created elsewhere. This code, should just let each thread enter, write to logifl.txt and then leave, allowing the next thread to do the same
each thread is a patient, for whom the variables cprnr, prio and skade are defined in patientStruct.h
I made made this following code:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>
I just need to know where I can read about my problem. I dont request anybody to actually write code.
by the way, it's linux programming with c
I want to know how I can make interrupts on threads.
Example:
1 thread is using 2 ressources of the same kind. Then comes a second thread which needs to use 1 of the same kind of ressources..
...
I'm using popen, as riget_version3 is another program.
Hi..
I need to make some CODE on this problem:
I have a stream of patients(threads!?) coming in random from a program, sometimes one patient, sometimes 2 patients, at a time. Each patient has...
Hi all
I need to sort through my array, and put all the patients into a queue. The sorting has to be made solely on 'prio', which takes a number from 1-4, where 1 has highest priority.
Can...
thanks, that solved it! :)
Also the '== 3' in the while, is replaced with the '> 0', or else I dont get any output
The code below doesnt work for me.. what am I doing wrong?
while( num < MAX && fscanf(f, "%[^\t]\t%d\t%c\n", p[0].cprnr, &p[num].prio, &p[num].skade) > 0)
{
/* Process Info */
...
okay, but how do I make the printf work again, so that I can see the output which is going to the struct, on the screen?
riget_version3 is a program, which stream these data out.
okay, but how do I make this array you are talking about?
and is qsort() the simplest way of doing it
thanks!
Hi there
I have a problem doing a sorting of my struct.
In my code it scans the file "riget_version3", and stores its data in 'cprnr', 'prio' and 'skade' in my struct, and prints it out.
The...