08-28-2009
thread creation
Void *fork_thread( void *ptr )
i am getting error in this line
please help me out
5 More Discussions You Might Find Interesting
1. Programming
how about asynchronous canceling?
or with signal?
if with signal whether it effects the process?
my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies
2. Solaris
Hi all!
Is there a function in c++ to create new threads.I have writen a class "Thread"
in which I will be calling this thread function to creat threads.
Also is there a function to synchronize threads .I know that we can create objects like semaphores and critical sections to synchronize in... (2 Replies)
Discussion started by: vijlak
2 Replies
3. Programming
dear sir/madam
presently i am in a process of creating a multithread pool using
clone() system call in unix with c programming.
i am facing some problem ie., i am able create multithread pool and
able to keep all the threads in wait state,but when i call kill
(afunction revoke a... (6 Replies)
Discussion started by: Radha
6 Replies
4. Shell Programming and Scripting
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void *fork_thread(void *ptr );
main()
{
pthread_t thread1;
char *message1 = "Thread 1";
int iret1;
iret1 = pthread_create( &thread1, NULL, fork_thread, (void*) message1);
exit(0);
}
Void *fork_thread(... (3 Replies)
Discussion started by: annapurna konga
3 Replies
5. Programming
Parent Thread Of Child Thread
Suppose a process creates some threads say threadC and threadD.
Later on each of these threads create new child threads say threadC1, threadC2, threadC3 etc. So a tree of threads will get created.
Is there any way to find out the parent thread of one such... (1 Reply)
Discussion started by: rupeshkp728
1 Replies
fread(3s) fread(3s)
Name
fread, fwrite - buffered binary input/output
Syntax
#include <stdio.h>
size_t fread(ptr, size, nitems, stream)
void *ptr;
size_t size, nitems;
FILE *stream;
size_t fwrite(ptr, size, nitems, stream)
void *ptr;
size_t size, nitems;
FILE *stream;
Description
The function reads into a block beginning at ptr, nitems of data of the size size (usually sizeof *ptr) from the named input stream. It
returns the number of items actually read.
If stream is stdin and the standard output is line buffered, then any partial output line will be flushed before any call to to satisfy the
The function appends, at most, nitems of data of the size size (usually sizeof *ptr) beginning at ptr to the named output stream. It
returns the number of items actually written.
Return Values
The and functions return 0 upon end of file or error.
See Also
read(2), write(2), fopen(3s), getc(3s), gets(3s), printf(3s), putc(3s), puts(3s), scanf(3s)
fread(3s)