Compiling errors in a program using threads
On compiling I am getting an error "undefined reference to pthread_create()" and similarly for "undefined reference to pthread_join()". What are the possible reasons? I am unable to identify them. ...
On compiling I am getting an error "undefined reference to pthread_create()" and similarly for "undefined reference to pthread_join()". What are the possible reasons? I am unable to identify them. ...
Possible Duplicate: kill thread in pthread How can I end a process running in a thread...or in other words how can I kill a thread? ...
Is busybox available in shared library form? I would like to use individual apps programmatically instead of using system(). I've heard about libbusybox and libbb but could not find any documentation. ...
I have a program that reads a "raw" list of in-game entities, and I intend to make an array holding an index number (int) of an indeterminate number of entities, for processing various things. I would like to avoid using too much memory or CPU for keeping such indexes... A quick and dirty solution I use so far is to declare, in the main...
Possible Duplicate: Is there a printf converter to print in binary format? Consider this small C application int main () { int bits = 100 >> 3; printf("bits => %d", bits); return 0; } How can I print the bits variable so I can see it as a binary value (with the bits clearly shifted), e.g. 00001100? I'm...
I am building a program that mainly parses binary data and does some number crunching on it. It's primary goal is to do it all as quickly as possible. It will be running on an 8 - 32 core machine [Xeon / Sparc T2]. I choose erlang becasue I beleive that concurrency is much easier as opposed to c++. However, about halfway through I start...
What does (10%2) mean? ...
can any one give me the dry output for this program? #include <stdio.h> main() { int a,b,c,d,e; printf("Enter the Number to Find it's Reverse\n"); scanf("%d",&a); while(a!=0) { b=a%10; c=a/10; printf("%d",b); a=c; } getchar(); } ...
The program is to open a directory and to display the name of the files... i.e if there is a file..it should say FILE....else DIRECTORY.. but the program displays all the files as directory.. Could anyone pls check the code for any errors....thnx #include<stdio.h> #include<dirent.h> #define DIR_path "root/test" main() { DIR...
I'm learning queues and I came across this piece of code. It's from a book, so I can't post the whole code here but what I'm posting will be sufficient. More than a problem, I just want to confirm that whether my understanding of this code is correct or not. In the function, delete_ap(), the 'if' statement calls qretrieve() function and...
Hello everyone, i'm reading a file which contains data such as this: 1,1 0.5,0.5 2,2 these are vectors, all numbers are double. since in my exercise the length of each vector is known, i'm using a for loop to read each vector: for (i=0; i<NUM; i++) { //number of vectors to read for (j=0; j<DIM; j++) { //length of each...
I found tsc2007 driver and modified according to our needs. Our firm is producing its own TI DM365 board. In this board we used TSC2007 and connected PENIRQ pin to GPIO0 of DM365. It is being seen OK on driver. when i touch to touchscreen cursor is moving but at the same time i am getting BUG: scheduling while atomic: swapper /0x0000010...
When I compile or run a file from VIM all error references are opened in the last active buffer regardless if the file is open already in another vim tab. This behavior is very annoying. Is there any way to force vim to behave like ':tab drop' on compile errors? (See http://vim.wikia.com/wiki/Edit_a_file_or_jump_to_it_if_already_open) ...
I'm learning queues from a book. The author explains the operation of inserting an element in queue using the following code. #define MAX 100 char *p[MAX]; int spos = 0; // spos: holds the index of the **next free** storage location int rpos = 0;// rpos: holds the index of the next item to retrieve void qstore(char *q) { if(spos==MA...
I'm learning about circular queues. Which implementation of circular queue is best, the array implementation or linked list implementation? ...
I'am looking for an eclipse-plugin for doxygen code documentation. I have found the eclox-plugIn ( http://home.gna.org/eclox/ ). I would like find out, how can it automatically generate a "empty" doxygen comment, which could be filled out later or what is the better choice for a documentation eclipse plugIn? For example for a function: ...
I have deliberated endlessly over which language/framework best suits the following. I need to develop a HPC framework. All processing will be completely OO. It will pass objects between instances (external) and internally between threads & engines. The Objects will be an extension of Active Messages. These instances could run on mobile...
I have this algorithm that I found here, just one thing puzzles me about it: Clear the stencil buffer to 1. Pick an arbitrary vertex v0, probably somewhere near the polygon to reduce floating-point errors. For each vertex v[i] of the polygon in clockwise order: let s be the segment v[i]->v[i+1] (where i+1 will wrap t...
Hello, gcc 4.4.4 c89 I am just wondering is there any standard that should be followed when creating types. for example: typedef struct date { } date_t; I have also seen people put a capital like this: typedef struct date { } Date; Or for variables typedef unsigned int Age; or this typedef unsigned int age_t; Is there any ...
In C, when we access a[i][j] using pointers why do we need the second * in *(*(a + i) + j)? Using printf() I see a + i and *(a + i) print the same value. ...