From patchwork Thu Feb 26 13:22:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mazen Adel Elmessady X-Patchwork-Id: 130688 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9BFEA4BA23E6 for ; Thu, 26 Feb 2026 13:23:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BFEA4BA23E6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=IedMpcDK X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id AEAAB4BA2E11 for ; Thu, 26 Feb 2026 13:22:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEAAB4BA2E11 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AEAAB4BA2E11 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772112175; cv=none; b=ehxncODekCSBxyEax5Dk4egd+dr5qg7ksmMAjYbVF2UnnOP8+BWS+dgm3KxsKgShNnYfNf4WLjveEFUQP8KkJGQ0cm47f/HDm+Va5zjcN7ZAHYE0PPL9KQcxv+JEO8NbBabFN/t7FT5EM39VgRSwejTSqAT/ZsA2w7KlUkocHt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772112175; c=relaxed/simple; bh=3w7tVgMLdEIJPLfS9S4vbqebCXdkEDLUL6Dpwhn9UDQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HE6/yyiKOhGjcbm1ISv2BWzK3yesPcN3mC7B4CUPJs6dF+HCnI0ObB8NlBUcDyyl74Dt2+/4p0UUTPNB4e6TThFfH3gajtoNLIIV8yOT6FVfHcgMn77q3ztFZH8kZXWjtIzXkDumV7/Ru4hCKwUtYdehRZP2joUsSmtSLVmZOzU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEAAB4BA2E11 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-48069a48629so9391035e9.0 for ; Thu, 26 Feb 2026 05:22:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772112174; x=1772716974; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JoOyOf4lsg6hTlQ1lB2t1UaplZqvToS2hwCHT7erZpc=; b=IedMpcDKQamE9kEzTkJyYyMKP6J2sqnC2zwCOauji/Y3GXRTwnZnFLZ+q0TuT3giKW K3X1Ss5Y+yGssHUcnFdFjOV+tf6zuwekTLbW3VmupBL23aTdkirptov4s+W/1QQxNsjp b3FmxCf/kDWUoR14Ss1/pGcqyMAQa3nmSWWOEzX4SuYlLdAVrTPO5fyuKr7BV0vdqthU 8wqRR9N9pTmgNE0Ydx1CKqgv7pK+9/5Q1VeEiwabLBGr5Zm0Uo7UT+93UhxPEY6uHcqj 5mEWSawt2rSW3gqgW8NwiQLAQzQ4lMWzHjfQXD7HfTFOB5VKpZaqKhLQfQ00Sf2s30B1 wkQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772112174; x=1772716974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JoOyOf4lsg6hTlQ1lB2t1UaplZqvToS2hwCHT7erZpc=; b=See7S/Yyzr1NE+xTbVuJo1fvtIqoU4qv2ic3Gf0XRqTepCWgov0NDbA5gNau1W9lvo AMzhPK6VSwk30ElCs1u5c6AD0dKWfjeMAdYUqdp0o9XzTiKbWI5H0JPiRW6hCecxOkVj ztyQyrXwWOhjIeT3Og7x2fRQxeVMqGhVtm1FPd+j+DSCLLqc4Wh0+RVIcrhKwEf9FGbe H1pyVSzowJQTUcmVWHc/d/5qTvOktcdycXy3ue2HETer64Vd0KwYC5OgV5k++1eOje5p 0rBw79HmosA7VR9x9olbKgMcl+ASYDgq5e/gsZ+Q2endR/U+pmcl3fFtvtG/UlacV04m ZqTg== X-Gm-Message-State: AOJu0Yzf4mI6zBs6NkNJhhyo29tHPO42apN7TH95SeJYDac7fQ2Mapjl auSwr0ZG8RHwCe9n1LB1yl/KCwwAoxug1ItsSihstc8YgBUP9yiiLetHenVY X-Gm-Gg: ATEYQzwWUvu0D4Oiwr6NQpT2hndRh21Fv49pYj5MEebHyXsw41UN822Q2kq7E/12Z73 5Byn+YV2QDcOGNFwYTcd1z2QIjxSc7m0TV3SRYqLBkHic6wV6yGzi7drwDwDitWexCy6Gka6HLj JwwNWk53AxmpSj5mAYjz/qfzuQXUg8/BDq2fNn0PwUzkofIYjwIhU3BrPmnMfRU2fnc/ZACJMJg S3bnav2xX5+vOhEXGjEbxczIjCFpoW51+2qLrJTzVAbOO5oHt1/xcPNhjoG9pp4RHqzGpHsCT77 QYZefGUeock0CgScfygPZVVKtX/quEPISEFIi7LDlTE+OzwBreMRWkzSurwtquirWfIAzGrXH2i 7rN3puwQqhxJRkFRvrncpg0lYR6bfX3ipzMh464eWBIOU3ltRgwm2lkYq2RpGwsN7B2n5ztLQpQ 6s4oCeGaQjxCWe4GWAb6I= X-Received: by 2002:a05:600c:470f:b0:482:eec4:758 with SMTP id 5b1f17b1804b1-483a95eaa50mr285353465e9.26.1772112174074; Thu, 26 Feb 2026 05:22:54 -0800 (PST) Received: from mez3n-82jf ([154.182.217.6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483bfec1a5bsm44565545e9.29.2026.02.26.05.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 05:22:53 -0800 (PST) From: Mazen Adel Elmessady To: newlib@sourceware.org Cc: joel.sherrill@gmail.com, Mazen Adel Elmessady Subject: [PATCH v2] Update: _Semaphore_Wait_timed to include clock selection Date: Thu, 26 Feb 2026 15:22:16 +0200 Message-ID: <20260226132216.661083-1-mez3n1151@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260224144856.431478-1-mez3n1151@gmail.com> References: <20260224144856.431478-1-mez3n1151@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GB_FREEMAIL_NUM, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org Updated _Semaphore_Wait_timed (which is currently unused in RTEMS) to _Semaphore_Wait_timed_clock which to be used in RTEMS sempahore API. This will ease the support of the new clock functions added in Posix Issue 8. V2: Kept _Semaphore_Wait_timed while adding _Semaphore_Wait_timed_clock --- newlib/libc/sys/rtems/include/sys/lock.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h index d6169025b..87cf06fc0 100644 --- a/newlib/libc/sys/rtems/include/sys/lock.h +++ b/newlib/libc/sys/rtems/include/sys/lock.h @@ -27,6 +27,7 @@ #define _SYS_LOCK_H_ #include +#include #include __BEGIN_DECLS @@ -298,6 +299,9 @@ void _Semaphore_Wait(struct _Semaphore_Control *); int _Semaphore_Wait_timed(struct _Semaphore_Control *, const struct timespec *); +int _Semaphore_Wait_timed_clock(struct _Semaphore_Control *, + const struct timespec *, __clockid_t); + int _Semaphore_Wait_timed_ticks(struct _Semaphore_Control *, __uint32_t); int _Semaphore_Try_wait(struct _Semaphore_Control *);