C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-03-2009, 05:25 PM   #1
Registered User
 
Join Date: Oct 2009
Posts: 1
Pthread programming .init file declaration and function call

Hey,
i'm working on a project which is using pthreads. Before i explain my question i want to explain my program simply.

There is a server and clients both are multithreaded.Program will look like local video center.
N clients(10) will send their request and server with n workers(4) will handle the requests.Cleints are waiting in a queue and whenever the server is available checksout or returns the videos.
there are some other details but i think it is enough to tell my question.

1) i must read an initialization file .init to which contains the titles of the videos, counts and some other information about the program. Does it mean that something like text document start.init will be created how?, then will be read (how) when the program is compiled? (the initilization file will be like database and will first call init() function to take these variables then i must call other functions)

2)when i create threads for example create(&threads[t], &attr, dowork, (void *)t); i call dowork , can some explain, first i want to create threads and then whenever i want i make thread call dowork or some other functions.

i'm new in thread programming just read some tutorials they are all for beginners and before i start writing my code i must understand what it wants...

any way if more explanation is needed just ask for it..

thanks
berkay is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screwy Linker Error - VC2005 Tonto C++ Programming 5 06-19-2007 02:39 PM
We Got _DEBUG Errors Tonto Windows Programming 5 12-22-2006 05:45 PM
Game Pointer Trouble? Drahcir C Programming 8 02-04-2006 02:53 AM
Dikumud maxorator C++ Programming 1 10-01-2005 06:39 AM
Problem with Visual C++ Object-Oriented Programming Book. GameGenie C++ Programming 9 08-29-2005 11:21 PM


All times are GMT -6. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22