add tdm_client_vblank_is_waiting 81/171381/3
authorBoram Park <boram1288.park@samsung.com>
Fri, 2 Mar 2018 07:06:07 +0000 (16:06 +0900)
committerBoram Park <boram1288.park@samsung.com>
Fri, 2 Mar 2018 08:14:22 +0000 (17:14 +0900)
Change-Id: I27df05723f0544c6f063a722100b6ecdbec6c944

client/tdm_client.c
client/tdm_client.h

index 54ae817..d109f3a 100644 (file)
@@ -1079,3 +1079,15 @@ tdm_client_vblank_wait_seq(tdm_client_vblank *vblank, unsigned int sequence,
 
        return TDM_ERROR_NONE;
 }
+
+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 175bb45..43edd41 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