thats what I will do, a producer and consumer thread!
thnx a lot
Luca
Type: Posts; User: jeanluca
thats what I will do, a producer and consumer thread!
thnx a lot
Luca
So you would suggest to create 1 thread which reads all files, and not a thread for each file, right ?
well, I need to process all files simultaneously (I need to combine the data), so I cannot do this with multiple instances!
But if IO isn't blocking the processing thread, this will be the best...
Hi All
I'm writing a tool which processes data. The amount of data can be huge, also multiple files.
So what I need to do is the following: 1) read from all files, for example, 1024 samples, 2)...
thnx a lot!!!
Hi All
I need a solution for my debug functionallity. Depending on the variable DEBUG, messages should or shouldn't appear in the console.
Can this be done with fprintf ? If DEBUG is 0 it...
I see, so it has todo with header files including each other
cheers
Hi All
I have a main file (main.c) which includes show.h and show1.h
But show1.c also includes show.h. show.h looks like
void init() ;
void show() ;
void set(int x) ;
int *get() ;
fortran 77 or 90 ? :)
good point, I'll skip the casts!
thnx
Well my code is pure C, but I guess it might be useful when it compiles with a c++ compiler too!
so, its a 'best practice' to always do the conversion youself!?
bar = (struct *FOO)malloc(sizeof(FOO)) ;
doesn't compile, but I found out it should be:
bar = (struct FOO*)malloc(sizeof(FOO)) ;
malloc returns a void pointer, so I thought you should cast it, like
char *str ;
str = (char*) malloc( 100 * sizeof(char) ) ;
I assume this is optional ? Just curieus, can this be done...
ok, I tried the following to fix it:
bar = (struct *FOO)malloc(sizeof(FOO)) ;
Doesn't compile :(
Hi All
I've written a test program to experiment with structs a little bit:
#include <stdio.h>
struct FOO {
int id ;
} foo, *bar;
check, thnx
Ok, make sense!, but then I have one last question, if I have a header file like
void check_config_file(char *file) ;
int load_config_file(char *filename) ;
struct CONFIG
{
int *var1...
Hi All
I need some guidance with header files because I can't solve the following compile error:
make
gcc -I./lib -c file1.c -o file1.o
gcc -I./lib -c file2.c -o file2.o
gcc -I./lib ...
I see the 3 running perfectly right now, so the bus error was indeed something else at that time!
Thats a good thing (I thought I had Bus errors with the other 2)
thnx!!
it works for me too :)
But, can someone explain the differences between:
printf( "value is %d\n", *(int*)getSomething(input) ) ;
,
I need the value
Hi
I have this function which returns a void pointer:
printf( "value is %d\n", (int*)getSomething(input) ) ;
printf( "value is %f\n", (float*)getSomething(input1) ) ;
This doesn't work...
Thnx for all the help!
I'm using gdb and valgrind now (which I didn't before) and I'm making progress!!
For example, I noticed that the function 'substring' wasn't correct at all :)
But I think...
Here is the output:
window_shift --> 12 en 13
119 105 110 100 111 119 95 115 104 105 102 116 7 | window_shift
119 105 110 100 111 119 95 115 104 105 102 116 | window_shift
What does...