Search:

Type: Posts; User: philipsan

Search: Search took 0.01 seconds.

  1. Difference between win32 and linux pthreads

    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...
  2. Replies
    9
    Views
    1,318

    I made this code now: #include ...

    I made this code now:


    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <pthread.h>
    #include <semaphore.h>
    #include <sys/types.h>
  3. Replies
    9
    Views
    1,318

    Yeah, I dont create any threads, because they are...

    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
  4. Replies
    9
    Views
    1,318

    each thread is a patient, for whom the variables...

    each thread is a patient, for whom the variables cprnr, prio and skade are defined in patientStruct.h
  5. Replies
    9
    Views
    1,318

    I made made this following code: #include...

    I made made this following code:



    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <pthread.h>
    #include <semaphore.h>
  6. Replies
    9
    Views
    1,318

    I just need to know where I can read about my...

    I just need to know where I can read about my problem. I dont request anybody to actually write code.
  7. Replies
    9
    Views
    1,318

    by the way, it's linux programming with c

    by the way, it's linux programming with c
  8. Replies
    9
    Views
    1,318

    Interrupts on threads

    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..
    ...
  9. Replies
    3
    Views
    2,077

    I'm using popen, as riget_version3 is another...

    I'm using popen, as riget_version3 is another program.
  10. Replies
    0
    Views
    1,300

    semaphore for threads

    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...
  11. Replies
    3
    Views
    2,077

    how to sort through an array

    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...
  12. Replies
    9
    Views
    2,428

    thanks, that solved it! :)

    thanks, that solved it! :)
  13. Replies
    9
    Views
    2,428

    Also the '== 3' in the while, is replaced with...

    Also the '== 3' in the while, is replaced with the '> 0', or else I dont get any output
  14. Replies
    9
    Views
    2,428

    The code below doesnt work for me.. what am I...

    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 */
    ...
  15. Replies
    9
    Views
    2,428

    okay, but how do I make the printf work again, so...

    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?
  16. Replies
    9
    Views
    2,428

    riget_version3 is a program, which stream these...

    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!
  17. Replies
    9
    Views
    2,428

    sorting through a struct

    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...
Results 1 to 17 of 17