From nobody Fri Apr 19 13:07:21 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VLZgJ2l71z5H2Tj for ; Fri, 19 Apr 2024 13:07:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VLZgH5B87z46M5 for ; Fri, 19 Apr 2024 13:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713532043; a=rsa-sha256; cv=none; b=VG70OPF0vifwhPsCoJVjmdLRshZHGIcl/A9Ye4ft3iUrWHTgtX20twefMBKVpZ19huW6bD hqfCZVeLOfKehgkN0mxC+UZI/efkyyyf02t7w/OQ90abszEVKb/2aB+v17O0WTMTrw43Zd 9/HYm8u6bdP7Mryud0rdcGq/NTf2dczeM/BTVpfr3Fk47y7QiaP6zyCJPEnmN1/jOoLsK2 jMXc9wEDJmSNzQb/ELXE6ObQgs3/tdgOgsMuE52S9NiECp4kpfCv2MVIiUnLgt41JSH7t5 emvG4vLlxeknKf9Iq+amPML/cYb5II4kTrr+KSUnbOMx3VSBrn0GTrIG1AcBBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713532043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sus9md18C1PY8qc8MptrJIXRAh+FFE5kmu1aWG33Pdk=; b=KTBxjB3bUbZ0M/gqPDOfskU9rj8GkMJ42+/nTPdtJpk5KLbYpi2k/bzp2SCD8nBelF2yy8 8w5H9+gOejd51JEUSTTIM4/QEymE5gNtfP/czcXOZgVPscJP8+qAm0Fcp/CjevuInKg3nR 1vNJApgzY+/kH33Sr7/k7oS6/20lFTXwYNSYh9jqTuFs7mmzrlax4hR1l7M064x6DMaGnX hSKi5IsdS8BxrkZM8pRCHZueBFoxHdKipx6sBf/rUfm/kwEqktjWCCZE6Grv/HzjQecnWn 7n1YP+/M1Vz8f/ZCrOiG185DFaeSURQqbHGRF2r39EFHBxYKMrd8fduNq2Rqsw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VLZgH4jXlztKr for ; Fri, 19 Apr 2024 13:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 43JD7NI5038855 for ; Fri, 19 Apr 2024 13:07:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43JD7N4G038853 for bugs@FreeBSD.org; Fri, 19 Apr 2024 13:07:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278459] Add pthread_sigqueue() Date: Fri, 19 Apr 2024 13:07:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: vini.ipsmaker@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278459 Bug ID: 278459 Summary: Add pthread_sigqueue() Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: vini.ipsmaker@gmail.com Linux and Solaris 11 offer pthread_sigqueue(3) that is to sigqueue(2) what pthread_kill(3) is to kill(2). I've been using pthread_sigqueue() on my own software to offer different "cancellation paths". To illustrate my need, he= re is the piece of the code that I want to be cancellable: https://gitlab.com/emilua/emilua/-/blob/v0.7.1/src/file.cpp#L520-532 As you can see, I use setjmp() for a switch expression that will allow me to jump to different cancel-handling paths. Here's the cancellation type-1: https://gitlab.com/emilua/emilua/-/blob/v0.7.1/src/file.cpp#L463 Here's cancellation type-2: https://gitlab.com/emilua/emilua/-/blob/v0.7.1/src/file.cpp#L93 Both cancellators just use pthread_sigqueue(). Cancellator type-1 will use sigval::sival_int=3D1 and cancellator type-2 will use sigval::sival_int=3D2= . The sighandler (SA_SIGINFO) will use this value as an argument to longjmp(): https://gitlab.com/emilua/emilua/-/blob/v0.7.1/src/core.cpp#L756 Can FreeBSD have pthread_sigqueue() as in Linux and Solaris? --=20 You are receiving this mail because: You are the assignee for the bug.=