XBOX is a bit special. Its kernel is a simplified version of nt kernel. OpenXDK uses the standard, existing, XBOX kernel. Linux for XBOX wipes it with the floor at installation time and recreate its own kernel, so you can probably create multiple threads with it.
With standard XBOX kernel, normally, theoretically, you are allowed to run only one main thread.
Just plug the interrupt above somewhere in openxdk and export the vbl_counter variable.
(it's possible it will be officially done later by a person that have rights to insert new code in cvs)
Then you can make your sync function :
void WaitForVBlank()
{
static unsigned long old=0;
while(vbl_counter==old) {};//or any other waiting function
old=vbl_counter;
}
But expert game developers are not doing such waiting...
They work on several screen buffers, and let interruption handler switch display to the next buffer to show.
It's often known as triple buffering technic (first buffer is shown, second one is being finished, last one will be drawn soon... and three pointers rotate to points on them)
And if you detect you are in advance, you can dynamically raise the detail level of the scene...
or lower it if you detect you didn't finish in time last one...
Top graphic speed is not achieved with parallelism made with several threads in the CPU. It's achieved with parallelism between one thread in CPU and massive DMA access in order to provide prepared pushbuffers towards the GPU (fastest games don't even go thru directX or very lightly)
http://www.bringyou.to/games/PS2 is a very interesting article (at the bottom of it you have the description of the port of a very fast game from PS2 towards XBOX and it gives very essential clues)