correct email address
[platform/core/uifw/libtdm.git] / src / tdm_macro.h
index 88dc034..00af3ef 100644 (file)
@@ -9,7 +9,7 @@
  *          Taeheon Kim <th908.kim@samsung.com>,
  *          YoungJun Cho <yj44.cho@samsung.com>,
  *          SooChan Lim <sc1.lim@samsung.com>,
- *          Boram Park <sc1.lim@samsung.com>
+ *          Boram Park <boram1288.park@samsung.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
@@ -212,6 +212,12 @@ static struct tdm_type_name tdm_conn_names[] = {
 };
 TDM_TYPE_NAME_FN(conn)
 
+static struct tdm_type_name tdm_capture_type_names[] = {
+       { TDM_CAPTURE_TYPE_ONESHOT, "none" },
+       { TDM_CAPTURE_TYPE_STREAM, "90" },
+};
+TDM_TYPE_NAME_FN(capture_type)
+
 static struct tdm_type_name tdm_transform_names[] = {
        { TDM_TRANSFORM_NORMAL, "none" },
        { TDM_TRANSFORM_90, "90" },
@@ -236,9 +242,11 @@ TDM_TYPE_NAME_FN(value_type)
 
 static struct tdm_type_name tdm_cb_type_names[] = {
        { TDM_THREAD_CB_NONE, "none" },
+       { TDM_THREAD_CB_EXIT, "exit" },
        { TDM_THREAD_CB_OUTPUT_COMMIT, "output-commit" },
        { TDM_THREAD_CB_OUTPUT_VBLANK, "output-vblank" },
-       { TDM_THREAD_CB_OUTPUT_CHANGE, "output-change" },
+       { TDM_THREAD_CB_OUTPUT_STATUS, "output-status" },
+       { TDM_THREAD_CB_OUTPUT_DPMS, "output-dpms" },
        { TDM_THREAD_CB_PP_DONE, "pp-done" },
        { TDM_THREAD_CB_CAPTURE_DONE, "capture-done" },
        { TDM_THREAD_CB_VBLANK_SW, "vblank-sw" },
@@ -454,6 +462,29 @@ static inline int TDM_MUTEX_IS_LOCKED(void)
 #define tdm_display_unlock(dpy)   _pthread_mutex_unlock(&((tdm_private_display *)dpy)->lock)
 
 
+/* debugging mutex ************************************************************/
+extern pthread_mutex_t tdm_debug_mutex_check_lock;
+extern const char *tdm_debug_mutex_lock_func;
+extern int tdm_debug_mutex_lock_line;
+
+#define _debug_pthread_mutex_lock(l) \
+       do { \
+               pthread_mutex_lock(l); \
+               pthread_mutex_lock(&tdm_debug_mutex_check_lock); \
+               tdm_debug_mutex_lock_func = __FUNCTION__; \
+               tdm_debug_mutex_lock_line = __LINE__; \
+               pthread_mutex_unlock(&tdm_debug_mutex_check_lock); \
+       } while (0)
+
+#define _debug_pthread_mutex_unlock(l) \
+       do { \
+               pthread_mutex_lock(&tdm_debug_mutex_check_lock); \
+               tdm_debug_mutex_lock_func = NULL; \
+               tdm_debug_mutex_lock_line = 0; \
+               pthread_mutex_unlock(&tdm_debug_mutex_check_lock); \
+               pthread_mutex_unlock(l); \
+       } while (0)
+
 #ifdef __cplusplus
 }
 #endif