add tdm_client_vblank_is_waiting 85/171385/3
authorBoram Park <boram1288.park@samsung.com>
Fri, 2 Mar 2018 07:06:07 +0000 (16:06 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 7 Mar 2018 01:35:48 +0000 (10:35 +0900)
Change-Id: I27df05723f0544c6f063a722100b6ecdbec6c944

client/tdm_client.c
client/tdm_client.h

index 4c38190f0a454d799c01f001bc22b07b5eab66db..e71c691f42f52e2602d05905e2f3c977b9af2052 100644 (file)
@@ -1467,3 +1467,15 @@ tdm_client_vblank_wait_seq(tdm_client_vblank *vblank, unsigned int sequence,
 
        /* LCOV_EXCL_STOP */
 }
+
+unsigned int
+tdm_client_vblank_is_waiting(tdm_client_vblank *vblank)
+{
+       tdm_private_client_vblank *private_vblank;
+
+       TDM_RETURN_VAL_IF_FAIL(vblank != NULL, 0);
+
+       private_vblank = vblank;
+
+       return (LIST_LENGTH(&private_vblank->wait_list) > 0) ? 1 : 0;
+}
index a96e4d4fd73f518683fb2af806443a4169194b4d..4ef687b99672905c5449677b7d0c4bb8d5b196e7 100644 (file)
@@ -409,6 +409,14 @@ tdm_client_vblank_wait(tdm_client_vblank *vblank, unsigned int interval, tdm_cli
 tdm_error
 tdm_client_vblank_wait_seq(tdm_client_vblank *vblank, unsigned int sequence, tdm_client_vblank_handler func, void *user_data);
 
+/**
+ * @brief Check if the client vblank object is waiting a vblank event
+ * @param[in] vblank The client vblank object
+ * @return 1 if waiting. 0 if not waiting.
+ */
+unsigned int
+tdm_client_vblank_is_waiting(tdm_client_vblank *vblank);
+
 #ifdef __cplusplus
 }
 #endif