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: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)

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)

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)

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
Rajko Albrecht | 26 Oct 2004 02:18
Picon

Problems parsing mail date

hi,

It seems that there is a bug with the mail-datetime parsing function. below is 
a (SPAM-)mail header which contains a correct date as I see but libetpan 
returns a broken date-time value (mailimf_date_time).

For a better check I called mailimf_date_time_parse(..) directly and it 
returns a date 1993-02-28 midnight - may be this is a default. Via the global 
interface it returns an empty datetime value. I think this is not correct, do 
you run into troubles with the missing +0000 before the "GMT"?

cu

Rajko

=== snip ===
 Message-Id: <869049087865478.UELKXNVDYJ@...>
To: maryweb@...,
 os@...,
 ral@...
From: "Jacqueline vonderHoehe" <Dwain@...>
Subject: Psst: Der Rufnummern-Spion  (helfen )
Date: Fri, 15 October 2004 01:20:52 GMT
MIME-Version: 1.0
Content-Type: text/plain;
  charset=iso-8859-1
Reply-To: Dwain@...
X-Priority: 5
X-MSMail-Priority: Low
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
(Continue reading)

DINH Viet Hoa | 26 Oct 2004 09:13
Picon
Favicon

Re: Problems parsing mail date

Rajko Albrecht wrote :

> For a better check I called mailimf_date_time_parse(..) directly and it 
> returns a date 1993-02-28 midnight - may be this is a default. Via the global 
> interface it returns an empty datetime value. I think this is not correct, do 
> you run into troubles with the missing +0000 before the "GMT"?
> 
> Date: Fri, 15 October 2004 01:20:52 GMT

dates usually looks like that :

Date: Sun, 17 Oct 2004 16:18:06 -0700

Then, the given date is invalid in about the given month and about the
given timezone.

--

-- 
DINH V. Hoa,

"j'arrête l'alcool" -- Arsunique
Gaël Roualland | 26 Oct 2004 10:09

Re: Problems parsing mail date

DINH Viet Hoa a écrit :

> Rajko Albrecht wrote :
>
> > For a better check I called mailimf_date_time_parse(..) directly and it
> > returns a date 1993-02-28 midnight - may be this is a default. Via the global
> > interface it returns an empty datetime value. I think this is not correct, do
> > you run into troubles with the missing +0000 before the "GMT"?
> >
> > Date: Fri, 15 October 2004 01:20:52 GMT
>
> dates usually looks like that :
>
> Date: Sun, 17 Oct 2004 16:18:06 -0700
>
> Then, the given date is invalid in about the given month and about the
> given timezone.

The timezone is actually rfc822 compliant, but the month is definitely
wrong...

Gaël.

--

-- 
Gaël Roualland -+- gael.roualland@...

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

Rajko Albrecht | 26 Oct 2004 10:47
Picon

Re: Problems parsing mail date

On Tuesday 26 October 2004 10:09, Gaël Roualland wrote:

> > Then, the given date is invalid in about the given month and about the
> > given timezone.
>
> The timezone is actually rfc822 compliant, but the month is definitely
> wrong...

Ok, you're the rfc822 experts ;) Well, as I saw all other mailsoftware parsed 
this date as a correct date - would it possible do the same within libetpan? 
It isn't such needfull, I know, but it looks a little bit ... strange when in 
list of mails there is an entry without a date... ;) 

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

Gmane