You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the type of all int parameters of system calls with unsigned,
because they are usually treated as uint32_t internally by the emulator.
And change the name of the parameter "screen" of the "draw_frame" system
call to "base" for the sake of consistency with the "setup_queue" system
call.
If a window does not already exist, one will be created with the specified `width` and `height`. The `screen` buffer will replace the content of the framebuffer, passing a different `width` or `height` compared to the size of the window is undefined behavior. This system call additionally polls events from the SDL library, and, if necessary, update the internal input specific event queue.
109
109
@@ -113,7 +113,7 @@ The width and height are merely the virutal dimensions of the screen; they are u
113
113
114
114
**system call number**: `0xC0DE`
115
115
116
-
**synopsis**: `void *setup_queue(void *base, int capacity, unsigned int *event_count)`
The user must pass a continuous memory chunk that contains two tightly packed queues, the event queue and the submission queue. And the submission queue is immediately following the last element of the event queue, which is the event queue's base address plus the size of each event element multiplied by the given capacity. If the capacity is not a power of two, it will be treated as the rounded value of the next highest power of two. Additionally, because the event counter variable serves as a notifier to the user that an event has been added to the event queue, it is critical to initialize it before passing its address to this system call.
119
119
@@ -129,7 +129,7 @@ An event entry is made up of a 32-bit value representing the event's type and a
129
129
130
130
**system call number**: `0xFEED`
131
131
132
-
**synopsis**: `void submit_queue(int count)`
132
+
**synopsis**: `void submit_queue(unsigned count)`
133
133
134
134
To inform the emulator that a batch of submissions should be processed, the application code should push several submissions into the queue first, and then pass the size of the submissions batch to this system call; the submissions will be processed and executed sequentially and immediately.
0 commit comments