thx i'll look at it, i'll compare the mutexes, maybe thats the problem after all
greetz
Type: Posts; User: lectrolux
thx i'll look at it, i'll compare the mutexes, maybe thats the problem after all
greetz
here is the code, and i've tried mutex but is does strange things, in the code you see my mutex to, it now only as comment
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>...
the first thread reads from com port en puts in buffer, the second thread reads from buffer and write (via function) to file.
The second thread stops without a reason , sometimes at that moment and...
but they must be infinite, the program is not supposed to end, neither does the thread
hi,
I have 2 threads in my program, and for some reason the second thread stops for no reason.
there is a
for(;;){
}
the purpose of thread 2 is to get al data out of the first buffer and put them into buffer2, in buffer2 the data becoms al whole message and then ion thread 3 I can search for a date , an hour in the...
thx for the url
greetz
hi,
I have 3 threads in my program but without mutex. Now the problem is that the 3th thread stops looping...
Do I have to use mutex and how does it work for 3 threads
static char...
use fscanf()
greetz
this function reservs a certain amount of memory for the char type and delivers a pointer to the beginneing of the space reserved.
int n;
char *s;
....
scanf("%d",&n);
s=malloc(n);
thx I'll try it, but in reading the port I also have to loop the buffer, this program gets constantly messages, the purpose is to read radar messages, the program never shots down, else there is data...
Normally the reading from port into buffer is ok, but then it goes wrong, something with passing through the message?? It does not write to file, function is never started.
the port reading works, it's the buffer and the writing to file that is the problem,
sorry for having no code tags
there is smething wrong with the message pointer, it does not write to file
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>...
thank you very much
this is the right thing, but i think the pointers are my problem, i just got into c, I need it for my project, i'm doing my internship.
thanx a lot
ok thanx, i thougth i was doing something wrong
question
i've put 2 threads in this forum but nobody replies to it, am i doing something wrong or does nobody knows the answer either
greetz
hi,
i have a static buffer of 32kb
data is put into it and while data is going in, i want to read into it and what i have read must be cleared?
can somebody help me please
platform is...
Hi,
I have a problem with reading from serial port. I have to read the com port continuously en put the data into files and database. The incoming data is very different from each other. some...