Pthread programming .init file declaration and function call
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..