Index: [thread] [date] [subject] [author]
  From: Steve Cheng <elmert@ipoline.com>
  To  : ggi-develop@eskimo.com
  Date: Tue, 15 Sep 1998 21:51:23 -0400 (EDT)

Re: Time for a stable version release ?

On Tue, 15 Sep 1998 mentalg@geocities.com wrote:

> On Tue, 15 Sep 1998, Marcus Sundberg wrote:
> 
> > The reason I'm so strongly against the latter case in my example
> > above is that I don't want to bloat the drawing primitives in
> > stubs.so and linear-*.so with locks just because some moron out there
> > can't code properly.
> 
> There shouldn't normally have to be locks in there (at least, not for the
> sake of LibGGI -- the implementation may require other locking).  All you
> need is to have locks in the library entry points -- in the main
> lib/libg*/stubs.c

I think there are problems with doing the locking in the library entry
points, because the underlying implementation (target, driver library, etc.)
may have its own locking requirements.  For example, on the X target,
there's no need to lock ggiPutPixel(),etc. because all they do is draw on a
piece of the main memory.  It would hurt performance.

Even if you have a ggiDrawPixel() and ggiSetMode() at the same time, for
example, always locking at the entry points still won't do any good e.g. if
the x,y to drawpixel is invalid in the new mode.  You really can't do
anything for the user there.

> How do the rest of you folks feel about this?

It is needed, no doubt, but I have to agree with Marcus above about locking
drawing primitives.

--
Steve Cheng

email: steve@ggi-project.org
www: <http://shell.ipoline.com/~elmert/>;

Index: [thread] [date] [subject] [author]