Welcome, Guest. Please login or register.

Author Topic: GLFW (OpenGL toolkit) port for AmigaOS  (Read 15210 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Re: GLFW port for AmigaOS
« on: May 19, 2003, 06:15:55 PM »
Greetings Gentelmen!

Sorry for the delay, I should have looked at this thread earlier, but (stupid me) I thought it may be another boring mumbo-jumbo. ;-)

AFAIK using standard 68k libraries has ONLY TWO requirements uppon CPU registers:
A7 - stack
A6 - library base
The rest of it is free to arrange by the guy who implements the library.
Additionally remember that:
A0,A1,D0,D1,FP0, FP1are so-called trash register, so the library user is obliged not to rely on any data that were previously in them
A2-A5,D2-D7,FP2-FP7 are supposed to be unchanged by any function, so if the library programer decides to use any of it, he MUST remember to preserve and restore them.

So

It's up to you where you want your arguments, so why not to have them in FPU registers? However if you decide to use FPU I think it would be extemally good practice to check for the its existance in Open() library function. If no FPU discovered library should refuse to open.

Of course we're talking about old Amiga standards here.

Good luck
PiR
 

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Re: GLFW (OpenGL toolkit) port for AmigaOS
« Reply #1 on: May 21, 2003, 01:25:49 PM »
@marcus

I hesitated if I should write about it, however I decided I will.

I think you can improve you implementation of condition variables. As I understood till now you have your condition variables and each task has a waitfor field with address of the condition variable it waits for.
So every time any condition variable is signalled/broadcasted you have to check through all the tasks. The more tasks you have the more you have to look through.

If you like the POSIX way I think you should make the following modification:
'waitfor' should actually be a listnode, while inside condition variable should be a listheader. Linking/Unlinking to the condition variables (done due to waiting for and waking up) should be mutexed of course.

This is you code, so if I should keep my nose out of it just ignore it. I'm playing a lot of POSIX threads last few months.

Good luck
PiR