Search:

Type: Posts; User: jet-plane

Search: Search took 0.04 seconds.

  1. Replies
    0
    Views
    3,085

    cross platform semaphore problem

    I'm confused with mingw and implementation of the semaphores in posix pthreads.
    Following code works without issues on linux, but when I compile it to exe, and run it's
    waiting 2 signals (which I...
  2. That worked really nice, good logic .. I must...

    That worked really nice, good logic .. I must learn to think like that. I tried different approach, which I found in other producer/consumer C examples. But they weren't appropriate for my case as...
  3. Ok I added the semaphore locking, and exit out...

    Ok I added the semaphore locking, and exit out the loop with previous lock. Only TODO remaining is dont use 100% of cpu, what do you mean by that ?
    here is the code:


    #include <stdlib.h>...
  4. Ok listening your suggestions, I have come to...

    Ok listening your suggestions, I have come to following:


    #include <stdlib.h>
    #include <stdio.h>

    #include <sys/types.h>
    #include <sys/ipc.h>
    #include <sys/shm.h>
  5. Eheh I know .. that's hurting my head too, but as...

    Eheh I know .. that's hurting my head too, but as you see I'm having really hard time with it,
    finally I made it. But now I would like to optimize a little and beautify the code. It's just too ugly...
  6. Eh I did it again , I nested the struct to add...

    Eh I did it again , I nested the struct to add locking mechanism, and now it's jumping again by 0x190 instead just 20 bytes.


    #include <stdlib.h>
    #include <stdio.h>

    #include <sys/types.h>...
  7. I must thank you again, you made my day :)

    I must thank you again, you made my day :)
  8. ahhhh, thank you VEERYYYY much, I was already...

    ahhhh, thank you VEERYYYY much, I was already loosing my mind. And I'm new to C programming so I'm still at war with pointers. Now it seams so logical and easy but I wouldn't never figure it out by...
  9. ok I added / uncommented printf ("Memory attached...

    ok I added / uncommented printf ("Memory attached at:&#37;X size:%d\n", (int) tuio_cmd, size);
    and in second prog. I added
    printf("tuio_cmd[i]:%p\n",tuio_cmd[i]);
    after tuio_cmd[i]->yo = i; (I edited...
  10. Thats not the python problem, as now after I...

    Thats not the python problem, as now after I fixed the wrong dereferencing in second C program,
    I got the same output (which I think I got in the first place as maybe I didn't recompile it after I...
  11. Ok here Is the output after I send it data with...

    Ok here Is the output after I send it data with python script .. the other program is segfaulting now, obviously I changed something there.
    Gdb output: Program received signal SIGSEGV, Segmentation...
  12. hmm here is the other half, and to repeat myself...

    hmm here is the other half, and to repeat myself .. the lock is there just for the moment, as I wanted to try if it's working.



    #include <stdlib.h>
    #include <stdio.h>

    #include <sys/types.h>...
  13. Thanks for trying to help, I posted this code...

    Thanks for trying to help, I posted this code also on the irc C channel and there I take a laugh from some ppl. That confused me totally, as now after trying to do this for all day I'm not sure even...
  14. problem with sending array of struct over shared memory

    First of all, Hello to the comunity!
    I hope someone will be able to help or at least give me some hint/guide on what I'm doing wrong here.
    Here is the code:


    #include <stdlib.h>
    #include...
Results 1 to 14 of 14