From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8973 Path: news.gmane.org!not-for-mail From: Dmitry Ivanov Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] Separate siginfo_t for MIPS Date: Thu, 10 Dec 2015 12:47:12 +0200 Message-ID: <20151210124712.3b4b811fd0d99a5b482b4ee3@ubnt.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1449744462 21984 80.91.229.3 (10 Dec 2015 10:47:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2015 10:47:42 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8986-gllmg-musl=m.gmane.org@lists.openwall.com Thu Dec 10 11:47:34 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1a6yl4-0002mE-LT for gllmg-musl@m.gmane.org; Thu, 10 Dec 2015 11:47:34 +0100 Original-Received: (qmail 8044 invoked by uid 550); 10 Dec 2015 10:47:32 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7999 invoked from network); 10 Dec 2015 10:47:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ubnt.com; s=google; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=dSksiq5VEEXuMF74weddw5GT7xpLruI84AhP7Zqu/K4=; b=kZHe2spqrbXq9X6dJjAFANvNs9TwH+ShwFVyHZ2nMPDEDTAv+CcvYtAzloDuuvkCOA TkBRqM4aWqCxbwR+Oob+pSz/8N9o6Zf/PbSQRI8s/jhOesoKRL4Rlhcwh9MSuqQiGgwb 47cTV0qB3SQ5OVowYA2lSjRx8sPGKUmwo5F4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-transfer-encoding; bh=dSksiq5VEEXuMF74weddw5GT7xpLruI84AhP7Zqu/K4=; b=SuWNz+LYLgxTi/B0dNVr6iTYWDu5Y3fUEjvy+2+lz4FnyzBqZcpT7Q9b0KWL8or6SB 3kfm2eKukhoiPecet1gFEKPNGleMvVzFd132+D/tIy+AqCS4cWTmp1aNXAM530wm6gLl ys6GPZMX+uFQdl+q46IhsAFz2XI3udUnBrXxMrAWHq1UsE/4S7jStakXIyXlwcZxSzTs YKuEJ2ZC8r6gv+6ascGmdovKUcxJtCSch8snwGp30t8DcsojvDgL8ykXGKvZ17c4+Tnc +aYsF+CV+9nM+olMY2agl0flWdjn7NePEGkTTJ0cnyjYfw5eeNLHF8h5kE+A0F9KbGHO DgkQ== X-Gm-Message-State: ALoCoQnq9BN6v/4YoQbiv0ZIdg6Qq3Vh8g4PjFn32qCEDhC0c52rpHJGnhGeAq3RshFOmVYqd7kyktgj1rER6d9WxiEEIwKzvkW7tGq4zJmIUAIlMofYVbZUGxB3PAbkidHXhsRMgLXkeiTx1bk19B12qrkaxawpbIL+8mEy/WjruqEcO6eYruLeuDE2BHkZDQuFZN07owvd X-Received: by 10.112.141.201 with SMTP id rq9mr4831935lbb.4.1449744434010; Thu, 10 Dec 2015 02:47:14 -0800 (PST) X-Mailer: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:8973 Archived-At: MIPS has non-default siginfo_t structure. Also, some si_code values are different. This patch is required for POSIX timers to work. --- arch/aarch64/bits/siginfo.h | 0 arch/arm/bits/siginfo.h | 0 arch/i386/bits/siginfo.h | 0 arch/microblaze/bits/siginfo.h | 0 arch/mips/bits/siginfo.h | 52 ++++++++++++++++++++++++++++++++++++++++++ arch/or1k/bits/siginfo.h | 0 arch/powerpc/bits/siginfo.h | 0 arch/sh/bits/siginfo.h | 0 arch/x32/bits/siginfo.h | 0 arch/x86_64/bits/siginfo.h | 0 include/signal.h | 7 ++++++ 11 files changed, 59 insertions(+) create mode 100644 arch/aarch64/bits/siginfo.h create mode 100644 arch/arm/bits/siginfo.h create mode 100644 arch/i386/bits/siginfo.h create mode 100644 arch/microblaze/bits/siginfo.h create mode 100644 arch/mips/bits/siginfo.h create mode 100644 arch/or1k/bits/siginfo.h create mode 100644 arch/powerpc/bits/siginfo.h create mode 100644 arch/sh/bits/siginfo.h create mode 100644 arch/x32/bits/siginfo.h create mode 100644 arch/x86_64/bits/siginfo.h diff --git a/arch/aarch64/bits/siginfo.h b/arch/aarch64/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/arm/bits/siginfo.h b/arch/arm/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/i386/bits/siginfo.h b/arch/i386/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/microblaze/bits/siginfo.h b/arch/microblaze/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/mips/bits/siginfo.h b/arch/mips/bits/siginfo.h new file mode 100644 index 0000000..42dbdf5 --- /dev/null +++ b/arch/mips/bits/siginfo.h @@ -0,0 +1,52 @@ +#define HAVE_ARCH_SIGINFO_T + +#undef SI_ASYNCIO +#undef SI_TIMER +#undef SI_MESGQ +#define SI_ASYNCIO -2 /* sent by AIO completion */ +#define SI_TIMER -3 /* sent by timer expiration */ +#define SI_MESGQ -4 /* sent by real time mesq state change */ + +/* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ +typedef struct { + int si_signo, si_code, si_errno; + union { + char __pad[128 - 2*sizeof(int) - sizeof(long)]; + struct { + union { + struct { + pid_t si_pid; + uid_t si_uid; + } __piduid; + struct { + int si_timerid; + int si_overrun; + } __timer; + } __first; + union { + union sigval si_value; + struct { + int si_status; + clock_t si_utime, si_stime; + } __sigchld; + } __second; + } __si_common; + struct { + void *si_addr; + short si_addr_lsb; + struct { + void *si_lower; + void *si_upper; + } __addr_bnd; + } __sigfault; + struct { + long si_band; + int si_fd; + } __sigpoll; + struct { + void *si_call_addr; + int si_syscall; + unsigned si_arch; + } __sigsys; + } __si_fields; +} siginfo_t; diff --git a/arch/or1k/bits/siginfo.h b/arch/or1k/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/powerpc/bits/siginfo.h b/arch/powerpc/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/sh/bits/siginfo.h b/arch/sh/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/x32/bits/siginfo.h b/arch/x32/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/arch/x86_64/bits/siginfo.h b/arch/x86_64/bits/siginfo.h new file mode 100644 index 0000000..e69de29 diff --git a/include/signal.h b/include/signal.h index 559362f..087657b 100644 --- a/include/signal.h +++ b/include/signal.h @@ -85,6 +85,11 @@ union sigval { void *sival_ptr; }; +#undef HAVE_ARCH_SIGINFO_T + +#include + +#ifndef HAVE_ARCH_SIGINFO_T typedef struct { int si_signo, si_errno, si_code; union { @@ -127,6 +132,8 @@ typedef struct { } __sigsys; } __si_fields; } siginfo_t; +#endif + #define si_pid __si_fields.__si_common.__first.__piduid.si_pid #define si_uid __si_fields.__si_common.__first.__piduid.si_uid #define si_status __si_fields.__si_common.__second.__sigchld.si_status -- 2.1.4