Re: Mailsemaphore / pthread library / PDASoftware
Gaël Roualland <[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <[email protected]> |
DINH Viet Hoa a écrit : > > Rajko Albrecht wrote : > > > as I seen libetpan in its current cvs version uses semaphores for threadsafe > > library. > > > > Of course this is fine, but not on PDAs :( > > > > linking again libpthread means one not wanted depend to external lib more. So > > I think (and others from OPIE team, too) that there should be a flag while > > configure disabling the built-in threadsafe mechanism or references to > > libpthread. Otherwise we run into a little bit trouble and libetpan becomes > > unuseable to us. > > That things is only used in the future multithreaded engine. > I will try to make it possible to disable this. Thoughts about this : Obviously a configure flag such as --disable-threads and stubs around semaphore calls (either macros, or static inlines, or ifdef arounds) would solve your problem on PDA. However, on regular hosts, this would mean the library could exist on a system in two different forms (either multithreaded or not). Since libetpan based applications will be designed to run in either modes, but not both, the two variants of the library need to be somehow binary incompatible, either with the linker (versionning?), or maybe something simple such as having two different separate names for the library (which is what QT does if I remember well), say libetpan for the regular, multithread one, and libetpan-nt or something like that for the other one... Depending on the configure flag either library could be built, or maybe both if the threading stuff is isolated in an optionnal object file. Gaël. -- Gaël Roualland -+- [email protected] ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl