From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B79D346EA1 for ; Fri, 18 Aug 2023 22:03:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E0F468C6D3; Sat, 19 Aug 2023 01:03:28 +0300 (EEST) Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E702268C199 for ; Sat, 19 Aug 2023 01:03:21 +0300 (EEST) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1c5046642b4so845825fac.1 for ; Fri, 18 Aug 2023 15:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692396200; x=1693001000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=a/9EVi2YYAPOJEUoXVZ4GO77Zu2lEHPsUpoyoIh54u0=; b=WX+fR0ESzM18RAX71UASJ/eExZsVUTxW5or3BHEi4b5mgnkzp9XtCzwSOiWC2jwzYB pMOX2ZHqAtzAlFPLHzztt4rVXbGo6PHH5v2ghcP81Xcrv74OkfbQiru5x8rw6UMFznbT /SSSuc2g6WXmsG7QNSqMnZL929fqRV+xFELVvDWj78njwrwy6bxTvI5FlffteBKYJiBq xXsLALus4+RetIPo2Py65b3Lici+o5w7eMqQTNCAtjDJsafGxIu4pCoRUZT9NhNR0zI3 uAh2YZYtf6RV9d3vjh4KDwPmC05V9/XZbGkkSHupS1AH5z2WF7LOaZJh8upDNysT9VLZ l4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692396200; x=1693001000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a/9EVi2YYAPOJEUoXVZ4GO77Zu2lEHPsUpoyoIh54u0=; b=WFbAS8WrtHgWGOZriVUJW9V3ev/XQjnnqsv483tWRnNEPGiaWAPpjCCbtPR6T7Rizz 9YrMJ6rl8NVKtrWpdtUlZdDuTj1q+aIUFr+2TiCbOuHVCNeGLqDrZnDTJeD7WdOalog1 FUQX+7OSkPQRIIiKfdfWMXrYeSvfzMhR+R9Tztsii1EOnGCvSnJeADvnY3Yuy5P03vKb UtFVKjl0iYvD69fNQRw3JoCaibDR+ePhi35334HIxuucCKBO18ph3/FensXng9X43rh2 ydnk59oSxcTUUovRukDlcB6SK7ryUA5RFMZA1RtivJVCNpc7ucAwxO3ui9gUrAtDwCCz qGnQ== X-Gm-Message-State: AOJu0Yx6dv6inovpz8pmNk4IVGys+DDg2Km2k5kt9gab1wjVoCu0LdCA JxlrbesqIav+ul1pzd+eSbhvWj6VqAY= X-Google-Smtp-Source: AGHT+IFIq5ta/ip1er12b5p9lXWDrOvtkGIkCjEselw+ogDAh5evjivkxNrs6922tnqqp5RpY6k2Ig== X-Received: by 2002:a05:6870:910d:b0:1b7:60aa:6bf9 with SMTP id o13-20020a056870910d00b001b760aa6bf9mr649653oae.14.1692396199845; Fri, 18 Aug 2023 15:03:19 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id o129-20020a4a4487000000b0056e9ffefee9sm650245ooa.3.2023.08.18.15.03.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 15:03:19 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Aug 2023 19:03:14 -0300 Message-ID: <20230818220314.3991-1-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818201613.GZ7802@pb2> References: <20230818201613.GZ7802@pb2> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3] avutil/thread: add wrappers for pthread_cond_t and pthread_t functions X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: James Almer --- libavutil/thread.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libavutil/thread.h b/libavutil/thread.h index 2f5e7e1cb5..f67b0cdc44 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -163,11 +163,25 @@ static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_ #define ff_mutex_unlock pthread_mutex_unlock #define ff_mutex_destroy pthread_mutex_destroy +#define AVCond pthread_cond_t + +#define ff_cond_init pthread_cond_init +#define ff_cond_destroy pthread_cond_destroy +#define ff_cond_signal pthread_cond_signal +#define ff_cond_broadcast pthread_cond_broadcast +#define ff_cond_wait pthread_cond_wait +#define ff_cond_timedwait pthread_cond_timedwait + #define AVOnce pthread_once_t #define AV_ONCE_INIT PTHREAD_ONCE_INIT #define ff_thread_once(control, routine) pthread_once(control, routine) +#define AVThread pthread_t + +#define ff_thread_create pthread_create +#define ff_thread_join pthread_join + #else #define AVMutex char @@ -178,6 +192,16 @@ static inline int ff_mutex_lock(AVMutex *mutex){ return 0; } static inline int ff_mutex_unlock(AVMutex *mutex){ return 0; } static inline int ff_mutex_destroy(AVMutex *mutex){ return 0; } +#define AVCond char + +static inline int ff_cond_init(AVCond *cond, const void *attr){ return 0; } +static inline int ff_cond_destroy(AVCond *cond){ return 0; } +static inline int ff_cond_signal(AVCond *cond){ return 0; } +static inline int ff_cond_broadcast(AVCond *cond){ return 0; } +static inline int ff_cond_wait(AVCond *cond, AVMutex *mutex){ return 0; } +static inline int ff_cond_timedwait(AVCond *cond, AVMutex *mutex, + const void *abstime){ return 0; } + #define AVOnce char #define AV_ONCE_INIT 0 @@ -190,6 +214,12 @@ static inline int ff_thread_once(char *control, void (*routine)(void)) return 0; } +#define AVThread char + +static inline int ff_thread_create(AVThread *thread, const void *unused_attr, + void *(*start_routine)(void*), void *arg){ return 0; } +static inline int ff_thread_join(AVThread thread, void **value_ptr){ return 0; } + #endif static inline int ff_thread_setname(const char *name) -- 2.41.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".