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...
Type: Posts; User: jet-plane
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...
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>...
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>
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...
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>...
I must thank you again, you made my day :)
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...
ok I added / uncommented printf ("Memory attached at:%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...
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...
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...
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>...
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...
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...