From patchwork Fri Sep 6 09:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1981718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=C0KhIJKq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X0WCp544xz1yfv for ; Fri, 6 Sep 2024 19:29:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E799A384A49C for ; Fri, 6 Sep 2024 09:29:56 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 0BFA13858CDA for ; Fri, 6 Sep 2024 09:29:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BFA13858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0BFA13858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725614981; cv=none; b=a25lW7+JERsl23K4SqMqhyAu1KGP0Pr82g5GKK7HyzxvAtgMHsmELJ+f/yBuIcV/j1pw/PDrQb1asPvIHQCi5s8plyUvEWkwkXl53UtNr3fmoxcDB16RMjdQCogv9fMl07sQZDBSBxa1YAfAmDA16cXD/y7LqTkczHzKNRC+RFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725614981; c=relaxed/simple; bh=emCzioTLUihQW75RcY/b4aICvi3pkwYgONoHYvvfWS8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TBH916BsUZ3+CtI6HVk/vG2nvVSS5vuDDp4faUc5mQAUNlqgzP6+4KZW3ZFgMl3NDhgMofgbqbhBA8ZapTWbglboxxymEQE7vqao/VtlWACxRVbUXPH/GDcLdNwviV5eJLY36FXkC34HMVUz8wIM+I3To0oFuj7/ndH08yPI0ow= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725614979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=ZQHtN1UClwih4p5GI7ClfKf1g52YaQssS5otlUU1EJs=; b=C0KhIJKqFaVHULWMtqoclBi4UkK0otMqMWco1egIhtpW0BquRITeGHGKSy6Vvilrs99NCv hwozdwjFbGrMmtNrySONDJr/vSp2Ixj4DptGeX1B4UIsH9/Xkk0uA2zK4zDh2swI8lSmL5 hF3cEj2SNAWoHxI84J2b6Vq6AFhCAlA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-540-K27Uwxs0OxuL53bCSFUjXw-1; Fri, 06 Sep 2024 05:29:38 -0400 X-MC-Unique: K27Uwxs0OxuL53bCSFUjXw-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3CC81955F65 for ; Fri, 6 Sep 2024 09:29:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.19]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CFAE43000236 for ; Fri, 6 Sep 2024 09:29:36 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] manual: Safety annotations for clock_gettime, clock_getres Date: Fri, 06 Sep 2024 11:29:33 +0200 Message-ID: <87v7z9i0zm.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org The annotations are preliminary, for consistency with existing annotations on gettimeofday etc. Reviewed-by: Carlos O'Donell --- manual/time.texi | 2 ++ 1 file changed, 2 insertions(+) base-commit: 1b171c942ea066c08a1e5aefb977e35da08ed291 diff --git a/manual/time.texi b/manual/time.texi index 6b1080db06..64aad8fdc5 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -532,6 +532,7 @@ Systems may support more than just these two POSIX clocks. @deftypefun int clock_gettime (clockid_t @var{clock}, struct timespec *@var{ts}) @standards{POSIX.1, time.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} Get the current time according to the clock identified by @var{clock}, storing it as seconds and nanoseconds in @code{*@var{ts}}. @xref{Time Types}, for a description of @code{struct timespec}. @@ -553,6 +554,7 @@ clock: @deftypefun int clock_getres (clockid_t @var{clock}, struct timespec *@var{res}) @standards{POSIX.1, time.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} Get the actual resolution of the clock identified by @var{clock}, storing it in @code{*@var{ts}}.