Re: public barrier functions
- From: Tim Janik <timj imendio com>
- To: Balazs Scheidler <bazsi balabit hu>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>, Sebastian Wilhelmi <seppi seppi de>
- Subject: Re: public barrier functions
- Date: Tue, 13 Dec 2005 17:04:44 +0100 (CET)
On Tue, 13 Dec 2005, Balazs Scheidler wrote:
On Mon, 2005-12-12 at 22:41 +0100, Sebastian Wilhelmi wrote:
That would make it impossible to fix the corresponding implementations
also for already compiled programs, should bugs surface (which they
already did) and it would also make it impossible to guarantee, that all
programs really use the same implementation, i.e. with inline functions
one module could use the asm version (because gcc is used) and the
second module would use the mutex versions (because another compiler is
used). That would be very bad of course.
That's a valid point but maybe it would be possible to request inlined
implementations of some functions by the use of a preprocessor symbol,
e.g.
#define G_GLIB_USE_INLINE_FUNCS
#include <glib.h>
Of course this would only be possible if it is not a maintenance
head-ache, e.g. the copied function bodies should not be copied, but
autogenerated instead.
Would something like this be accepted?
it could be a maintenance headache and produce subtle bugs because
different modules could then use different emchanisms to access an
atomic variable as sebastian outlined earlier in this thread.
if you want an inlined version for the hell of it, pick the implementation
specific for your processor & compiler out of gatomic.c, copy it into
your code and use it for your own atomic variables only. short of that,
you'll have to live with the overhead of a function call for every atomic
operation (this was deliberately decided when the atomic operations
where implemented).
--
Bazsi
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]