From patchwork Thu Sep 5 18:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1981376 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=SpNFwC98; 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 4X07KS0CkXz1yg3 for ; Fri, 6 Sep 2024 04:33:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 256D9384AB6B for ; Thu, 5 Sep 2024 18:33:30 +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 69DF1385C6CE for ; Thu, 5 Sep 2024 18:33:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69DF1385C6CE 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 69DF1385C6CE 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=1725561191; cv=none; b=WkBEknfSRoxd9zPKXfKM3OOEjGsOckyNC0WSew0op3NioMBcKrjCXECgQLYeES/yoBI0B2Y7rn+0ltRfHDje8IuMeH3UKX5z3Wsgf7rNOXQH4HmeLYCoAzCjySv7DVLfgmhdYaAvVv81g+RPnor7GWvbYPf2EDdFfPM7lVBj8Mg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725561191; c=relaxed/simple; bh=DUB6Ze7y0+hDPCKUoEspkhFM47H+6pnDr3zzEB4XQmA=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=TMEQ2+AQe9cmjXIyQ/v4rgWEbCeBKyHu6UI9T5jnxinkEA28HtbR9DFdKaYy9awCCp/p9HM/oFRaFg2BmbIU9ty1XYjHLyYhZoIGOcnNDU1S6onkwg0jB2ad2QxotPcvdlkWfk6d+G4jTYoutUy0kZCvn18v5HIuekGx1JLI+q4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725561189; 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=v9utRkHwcCLwC7vjA7os5T7iw1obO4Ca31wGphGuCgI=; b=SpNFwC98Fv1Jqz3Bsy4dGGk9lzyg9K9JEWaYYMxLwbjo/T7cwHoPKerYrLTz46NoCepXH4 xDJDfaqQbj+6/xUHoUjb76zKyUPcGI2DsEnIdJm+FuPxunCX4N/yJZ4qe5AFCzkSz+jH/v 1ptMlcIG6MuGEerUqUC7mwn3CwBsb8Q= Received: from mx-prod-mc-02.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-446-rWp-_ku4M6KB6d0f_3SOWQ-1; Thu, 05 Sep 2024 14:33:07 -0400 X-MC-Unique: rWp-_ku4M6KB6d0f_3SOWQ-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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 182851953943 for ; Thu, 5 Sep 2024 18:33:07 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.26]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1801030001AB for ; Thu, 5 Sep 2024 18:33:05 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 0/3] Add the sched_setattr, sched_getattr functions Message-ID: X-From-Line: ad549bdb0804ad41ed8e0614598b07d0e5c9bf7b Mon Sep 17 00:00:00 2001 Date: Thu, 05 Sep 2024 20:33:03 +0200 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=-2.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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=no 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 These are straightforward system call wrappers. Like the existing sched_* scheduler policy functions, sched_setattr interacts poorly with PTHREAD_PRIO_PROTECT mutexes. Documentation mostly refers to the manual pages. Tested on i686-linux-gnu, x86_64-linux-gnu. Built with build-many-glibcs.py. Thanks, Florian Florian Weimer (3): manual: Extract the @manpageurl{func,sec} macro Linux: Add the sched_setattr and sched_getattr functions Linux: Add missing scheduler constants to NEWS | 3 + manual/macros.texi | 7 +- manual/resource.texi | 103 +++++++++++++++++ sysdeps/unix/sysv/linux/Makefile | 13 +++ sysdeps/unix/sysv/linux/Versions | 4 + sysdeps/unix/sysv/linux/aarch64/libc.abilist | 2 + sysdeps/unix/sysv/linux/alpha/libc.abilist | 2 + sysdeps/unix/sysv/linux/arc/libc.abilist | 2 + sysdeps/unix/sysv/linux/arm/be/libc.abilist | 2 + sysdeps/unix/sysv/linux/arm/le/libc.abilist | 2 + sysdeps/unix/sysv/linux/bits/sched.h | 58 +++++++++- sysdeps/unix/sysv/linux/csky/libc.abilist | 2 + sysdeps/unix/sysv/linux/hppa/libc.abilist | 2 + sysdeps/unix/sysv/linux/i386/libc.abilist | 2 + .../sysv/linux/loongarch/lp64/libc.abilist | 2 + .../sysv/linux/m68k/coldfire/libc.abilist | 2 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 2 + .../sysv/linux/microblaze/be/libc.abilist | 2 + .../sysv/linux/microblaze/le/libc.abilist | 2 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 2 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 2 + .../sysv/linux/mips/mips64/n32/libc.abilist | 2 + .../sysv/linux/mips/mips64/n64/libc.abilist | 2 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 2 + sysdeps/unix/sysv/linux/or1k/libc.abilist | 2 + .../linux/powerpc/powerpc32/fpu/libc.abilist | 2 + .../powerpc/powerpc32/nofpu/libc.abilist | 2 + .../linux/powerpc/powerpc64/be/libc.abilist | 2 + .../linux/powerpc/powerpc64/le/libc.abilist | 2 + .../unix/sysv/linux/riscv/rv32/libc.abilist | 2 + .../unix/sysv/linux/riscv/rv64/libc.abilist | 2 + .../unix/sysv/linux/s390/s390-32/libc.abilist | 2 + .../unix/sysv/linux/s390/s390-64/libc.abilist | 2 + sysdeps/unix/sysv/linux/sched_getattr.c | 27 +++++ sysdeps/unix/sysv/linux/sched_setattr.c | 26 +++++ sysdeps/unix/sysv/linux/sh/be/libc.abilist | 2 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 2 + .../sysv/linux/sparc/sparc32/libc.abilist | 2 + .../sysv/linux/sparc/sparc64/libc.abilist | 2 + sysdeps/unix/sysv/linux/tst-sched-consts.py | 56 +++++++++ sysdeps/unix/sysv/linux/tst-sched_setattr.c | 106 ++++++++++++++++++ .../unix/sysv/linux/x86_64/64/libc.abilist | 2 + .../unix/sysv/linux/x86_64/x32/libc.abilist | 2 + 43 files changed, 465 insertions(+), 4 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/sched_getattr.c create mode 100644 sysdeps/unix/sysv/linux/sched_setattr.c create mode 100644 sysdeps/unix/sysv/linux/tst-sched-consts.py create mode 100644 sysdeps/unix/sysv/linux/tst-sched_setattr.c base-commit: 3e4a01870ef9605ccf6475215a4b32aa86d5d206