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 2823046E9C for ; Fri, 18 Aug 2023 16:07:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C274C68C65D; Fri, 18 Aug 2023 19:07:18 +0300 (EEST) Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 71D8D68C56A for ; Fri, 18 Aug 2023 19:07:12 +0300 (EEST) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1c4f47810c6so609807fac.0 for ; Fri, 18 Aug 2023 09:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692374830; x=1692979630; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=2jpSNu1YhynOOBgU0sRsZMMqWWyJfsPTgnr+0Sn/Am8=; b=nDlK6h/1Hjw9/fAaconswZvwKRxfNfiuMiOyeEOsTng5fYylg8uONPFiuO/Bhg7QVt 6iNlV2guFfLxtI2sB+zFLEHJaWTL/uHwjfinAKRhpA1dZUxHGJ987ulK2jkRB9QgSpbF +2qrYv6TF4n1iruVaZiSR4tSlaUYaBYZM4TaWREXOJDNTNYXXu/cZwPzhHCZGEWJA0x6 b3iGJUqH3WOOUI1XjPToAMlc/nScw36Lj2pB+t0J3nrres6ZS4OLMqGAU6/Oq/90OIxH swGJxg/1SY7S62LkJBRjg+bAYPeGwoJEC7qgqzxCT18FFivJffdQH8ucp5eLGbyAigbU LeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692374830; x=1692979630; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2jpSNu1YhynOOBgU0sRsZMMqWWyJfsPTgnr+0Sn/Am8=; b=jJueJ14i8T2SPU/0pzAXw96ZCzaR9VYSzqLwV9iEM7xwj51rrNd0E1oy5Zq7mYwZqu YfEXm9weZRcdjI0JLJLjY+8bnhkA3gHj7suMffRCsnyhPqE2JZeo+HYCpwztFiTYASwf +iGXKsbhqHjDMeaZb/DGd+nR9CdtHK8km1Lr7Ld24d9kvx8GJ2ZMhV+9clL4oaTGtbiZ v+k8mj3PXOGM5v8tuwN+Ke4MYRoaAzj5c+Ba/4VFF4KGQqtBcEvjxupiTFYzz/jxMJBG OD7qxDCVp0M1si7yZSiVhPd2v9/IbvflLRE/Jp48DWdicBSYmM0S4OxaOnZ8wB+EwBv9 g/Fg== X-Gm-Message-State: AOJu0Yw2i9YnsrQYCYu75a2MyBeLkZlcdhUg0eihyOV/1M9aX8RWJrNb j+SRLDVsz0NN5mns9nlFKeSBAMkgLPg= X-Google-Smtp-Source: AGHT+IHNLiQ2ZrjqbIzYqOBHH4R7ccjXN4iBZTruqA7sManm6fTMxjKWH4Lqz9qD+h7kvbvGaHuyXA== X-Received: by 2002:a05:6870:eaa9:b0:1bf:fd8a:826e with SMTP id s41-20020a056870eaa900b001bffd8a826emr3297301oap.55.1692374829677; Fri, 18 Aug 2023 09:07:09 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id v18-20020a056870955200b001c03d1a519fsm1162753oal.39.2023.08.18.09.07.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 09:07:09 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Aug 2023 13:06:56 -0300 Message-ID: <20230818160656.3938-1-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] 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 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libavutil/thread.h b/libavutil/thread.h index 2f5e7e1cb5..1e456f1c29 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -155,6 +155,15 @@ static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_ #include "compat/w32pthreads.h" #endif +#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 AVMutex pthread_mutex_t #define AV_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER @@ -170,6 +179,16 @@ static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_ #else +#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 AVMutex char #define AV_MUTEX_INITIALIZER 0 @@ -190,6 +209,14 @@ static inline int ff_thread_once(char *control, void (*routine)(void)) return 0; } +typedef struct pthread_t { + void *dummy; +} pthread_t; + +static inline int pthread_create(pthread_t *thread, const void *unused_attr, + void *(*start_routine)(void*), void *arg){ return 0; } +static inline int pthread_join(pthread_t 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".