From 4bfabc20a70f8134b34818b7c9ec9c05eac276a6 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Sat, 1 Feb 2020 21:39:29 +0800 Subject: [PATCH] use System V semaphore set instead of posix semphore for shared surface --- src/include/dc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/include/dc.h b/src/include/dc.h index e579058f..125df928 100644 --- a/src/include/dc.h +++ b/src/include/dc.h @@ -517,16 +517,16 @@ static inline void _dc_step_y (PDC pdc, int step) # ifdef _MGSCHEMA_COMPOSITING -# define BLOCK_DRAW_SEM(pdc) \ -do { \ - if (pdc->surface->shared_header) \ - sem_wait (&pdc->surface->shared_header->sem_lock); \ +# define BLOCK_DRAW_SEM(pdc) \ +do { \ + if (pdc->surface->shared_header) \ + LOCK_SURFACE_SEM (pdc->surface->shared_header->sem_num); \ } while (0) -# define UNBLOCK_DRAW_SEM(pdc) \ -do { \ - if (pdc->surface->shared_header) \ - sem_post (&pdc->surface->shared_header->sem_lock); \ +# define UNBLOCK_DRAW_SEM(pdc) \ +do { \ + if (pdc->surface->shared_header) \ + UNLOCK_SURFACE_SEM (pdc->surface->shared_header->sem_num); \ } while (0) # define IS_SCREEN_SURFACE(pdc) \