Patent ID: 8656394

Claim:
A method for executing application commands associated with a plurality of streams, the method comprising: receiving a first command from an application program, wherein the first command is designated by an application programming interface (API) implemented by a device driver; parsing, via the device driver, the first command to identify a first stream token that is associated with a first stream; compiling the first command to generate a first operation to be executed by a processing unit via the first stream; checking a memory location associated with the first stream for a first semaphore; determining that the first semaphore has not been released; until the first semaphore has been released, halting the execution of each command in the application program subsequent to the first command until the processing unit has finished executing each operation associated with the first stream; and once the first semaphore has been released, transmitting the first operation to the processing unit for execution once the first semaphore has been released.