History

habanalabs: allow to wait on CS without sleep

The user sometimes wants to check if a CS has completed to clean resources. In that case, the user doesn't want to sleep but just to check if the CS has finished and continue with his code. Add a new definition to the API of the wait on CS. The new definition says that if the timeout is 0, the driver won't sleep at all but return immediately after checking if the CS has finished.

Oded Gabbay committed 6 years ago

Commit 681a22f1 parent 230b9b72 files · +8 −2Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/misc/habanalabs.h+3−0
@@ -914,6 +914,9 @@ struct hl_debug_args { · 913 unmodified lines
914914 * inside the kernel until the CS has finished or until the user-requested
915915 * timeout has expired.
916916 *
917+ * If the timeout value is 0, the driver won't sleep at all. It will check
918+ * the status of the CS and return immediately
919+ *
917920 * The return value of the IOCTL is a standard Linux error code. The possible
918921 * values are:
919922 *