Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Sun, 13 Sep 1998 12:17:13 +0000

Re: Time for a stable version release ?

becka@rz.uni-duesseldorf.de wrote:
> 
> > > If the struct contains pointers to lock/unlock functions, the target can
> > > customize the behaviour according to its needs. KGI can use the complicated
> > > shared user-/kernelmem scheme I proposed at some time, while others can
> > > just use simple locks eventually coupled with a ggiFlush() or something.
> >
> > This sound like a good idea. But why just not pass the buffer
> > number.
> 
> Because I want to keep it generic. I'd like to be able to use the very
> same ggiLock function to lock down anything that might one day need to be
> locked down.

Didn't you just say we should call it something like ggiLockFrameBuffer?
Then it would be pretty weird to use it to lock other things.
Besides "locking" of framebuffers are fundamentally different from
other locks. Most locks are used to prevent to threads accessing the
same memory at the same time, but the bufferlocking functions are
just functions that tells the library that the user wishes to start/stop
accessing the framebuffer. Actually we could rather call the functions
ggiDBEnable() and ggiDBDisable(), as this "lock" name seems to just
cause
confusion.

> The App might have spawned a thread and the thread might have locked the
> buffer or vice versa.
>
> We have a fullscreen web browser and a thread animate_logo.
> The thread might want to check, if the app has locked the buffer, and
> only if it hasn't it would do so itself and update the logo.

Why should we bloat libggi with this??
Libggi is not a high-level gfx API. We should make sure that
calling drawingprimitives, setpalette and such functions from
different threds work, but that's it.
Things like the above, synchronising modesetting between threads
etc. belongs either in the app or in a higher level API.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

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