Rajko Albrecht | 17 Oct 2004 15:35
Picon

Mailsemaphore / pthread library / PDA Software

hi,

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.

As I saw the stuff was inserted start of september so I think handling it in a 
more comfortable enduser-way should be possible.

what about?

Rajko

-------------------------------------------------------
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
DINH Viet Hoa | 17 Oct 2004 15:56
Picon
Favicon

Re: Mailsemaphore / pthread library / PDA Software

Rajko Albrecht wrote :

> Of course this is fine, but not on PDAs :( 

Waht is available on your PDA target.
Because, I noticed that there were some pthread calls that seemed to
work fine on your PDA, such as pthread_mutex_lock().

Do you have any detailed information about POSIX thread availability
on your PDA plateform ?

Is /usr/include/semaphore.h present ?

--

-- 
DINH V. Hoa,

"Tu as lu combien de bandes dessinées ce mois-ci ? 13 Go"
Rajko Albrecht | 17 Oct 2004 16:21
Picon

Re: Mailsemaphore / pthread library / PDA Software

Am Sonntag, 17. Oktober 2004 15:56 schrieb DINH Viet Hoa:
> Rajko Albrecht wrote :
> > Of course this is fine, but not on PDAs :(
>
> Waht is available on your PDA target.
> Because, I noticed that there were some pthread calls that seemed to
> work fine on your PDA, such as pthread_mutex_lock().
>
> Do you have any detailed information about POSIX thread availability
> on your PDA plateform ?
>
> Is /usr/include/semaphore.h present ?

Yes, of course its all present. I think I had said it in a wrong way: Per 
default on linux-based PDAs is a libpthread. The problems are more the gui 
(qt/Embedded based) cause qt/Embedded 2 isn't threadsafe. (otherwise it will 
linked against pthread itself). 

Due size limits and so on we must try to reduce the dependies to external 
libs. Eg.: we can not use threads with qt/E 2. So we will not build threaded 
applications. (We == OPIE team). So we don't require the libpthread linked to 
apps.

Otherwise: newser QT/E are threadsafe. eg., are linked against pthread. But: 
then we will create threaded applictions in another way, eg., we make our 
apps threadsafe on a higher level. Eg., we don't require thread-safe base 
libs (from our point of view etpan is such a baselib) (at current moment I 
see). 

May be that later we require that or it isn't a size/runtime problem linking 
(Continue reading)

DINH Viet Hoa | 25 Oct 2004 08:51
Picon
Favicon

Re: Mailsemaphore / pthread library / PDA Software

Rajko Albrecht wrote :

> Otherwise: newser QT/E are threadsafe. eg., are linked against pthread. But: 
> then we will create threaded applictions in another way, eg., we make our 
> apps threadsafe on a higher level. Eg., we don't require thread-safe base 
> libs (from our point of view etpan is such a baselib) (at current moment I 
> see). 

This is commited.

> p.s.: I forgot: As I see and got reported the libetpan + OPIE-Mail are working 
> real fine and stable and meanwhile there is at least on clone of opiemail for 
> linux-based handhelds out, eg. not for OPIE but for qt-based handhelds.
> good work getting libetpan working with ARM.

fine.

I am planning some real thread-safe API to design applications with
some more responsiveness, but maybe you're not interested in.

--

-- 
DINH V. Hoa,

"Et alors, les parents d'Odile ? Ils sont trop cool, et tout ce qu'ils
  veulent, c'est qu'elle sorte en boîte tous le soirs [...]
  et ils militent contre les maths à l'école ?" -- Virginie Despentes
DINH Viet Hoa | 17 Oct 2004 15:51
Picon
Favicon

Re: Mailsemaphore / pthread library / PDA Software

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.

By the way, what kind of thread interface is available on PDA ?
I think that for user interface response, sometimes, threads are needed.

> As I saw the stuff was inserted start of september so I think handling it in a 
> more comfortable enduser-way should be possible.
> 
> what about?

I'll try to do some work around that.

--

-- 
DINH V. Hoa,

"Tu as lu combien de bandes dessinées ce mois-ci ? 13 Go"
(Continue reading)

Gaël Roualland | 17 Oct 2004 23:35

Re: Mailsemaphore / pthread library / PDASoftware

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
(Continue reading)


Gmane