Framework Initialize function delayed...
Framework Initialize function delayed...
- Subject: Framework Initialize function delayed...
- From: "rohit dhamija" <email@hidden>
- Date: Wed, 12 Apr 2006 13:52:33 +0530
Dear all,
I am enountering a strange issue and require your suggestion/comments to
resolve the same:
My product consists of
a) Framework: User level Framework that communicates with my bulk device
driver and to fetch the information
b) Application: My application that communicates with the framework to get
the info.
My application loads the framework and then calls a function GetData()
exposed in the framework.
At framework level during initialization routine [ i.e. CALL_ON_LOAD ,
updated to extern void MyInitFunc(void) __attribute__ ((constructor)) ] :: I
enumerate my keys (usb bulk devices)
But as soon as I run the application, it
1) Loads the framework
2) and then GetData() gets called up instead of initialization routine
3) Initialization routines gets called up.
As per my knowledge, the Framework must call its initialize rountine and
then other functions shall get called up.
To overcome the problem, i have two ideas (but i still feel , there can be
better way out)
1. Add Sleep in my application code . sleep(1). So that when application
loads, the initialize routine should get enough time to complete its
processing
2. In framework, take a static variable isInitializationRoutineCompleted =
false, global. Set it to true at end of Initialization routine. And at start
of Getdata()
check
while(isInitializationRoutineCompleted == false){
return;
}
Did anybody encountered such type of issue ?
What can be the possible way out to resolve the issue ?
All comments / suggestions are most welcome!
Thanks and Regards,
RDH
--
Rohit Dhamija(M) 9818446545
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden