help-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-serveez] Thread safety


From: stefan
Subject: Re: [help-serveez] Thread safety
Date: Tue, 10 Dec 2002 19:23:48 +0100 (CET)

On 8 Dec 2002, Andreas Rottmann wrote:

> >  * create 'threads.h' and 'threads.c' into libserveez
> >  * use system dependent #ifdef #endif's
> >  * supply a system independent interface like:
> >     - svz_mutex_create (char *name)
> >     - svz_mutex_lock (char *name)
> >     - svz_mutex_unlock (char *name)
> >     - svz_mutex_destroy (char *name)
> >    The mutices in serveez should be referenced by a unique name and should
> >    be managed in a 'svz_hash_t'.
> >  * if no thread/mutex API is available on the system the functions should
> >    be empty and thread-safety goes to waste
> >  * for GNU/Linux I proprose the pthread API
> >
> I think PThreads are standardized/implemented on enough platforms that
> it doesn't make sense to create yet another built-upon pthreads thread
> API, but that's just my opionion, YMMV... I think it would make sense
> to use pthreads if available, as there are implementations for nearly
> all of the Unices (and if there is no implementation, one could use
> GNU pth's pthread emulation) and also for Win32.

As I already stated:  If ever -> then a wrapper API, because this what
Serveez is mostly about: system independence.

Raimi:  What do you think about that?

Cheers,
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]