2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
+ Add biarch support for "struct sigevent".
+ * time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (printsigevent32):
+ New function.
+ [LINUX] (printsigevent): [SUPPORTED_PERSONALITIES > 1]
+ Handle 32-bit personality.
+
Add biarch support for "struct timex".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32):
New function.
{ 0, NULL }
};
+#if SUPPORTED_PERSONALITIES > 1
+static void
+printsigevent32(struct tcb *tcp, long arg)
+{
+ struct
+ {
+ int sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+
+ union
+ {
+ int tid;
+ struct
+ {
+ int function, attribute;
+ } thread;
+ } un;
+ } sev;
+
+ if (umove(tcp, arg, &sev) < 0)
+ tprintf("{...}");
+ else
+ {
+ tprintf("{%#x, ", sev.sigev_value);
+ if (sev.sigev_notify == SIGEV_SIGNAL)
+ tprintf("%s, ", signame(sev.sigev_signo));
+ else
+ tprintf("%u, ", sev.sigev_signo);
+ printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???");
+ tprintf(", ");
+ if (sev.sigev_notify == SIGEV_THREAD_ID)
+ tprintf("{%d}", sev.un.tid);
+ else if (sev.sigev_notify == SIGEV_THREAD)
+ tprintf("{%#x, %#x}",
+ sev.un.thread.function,
+ sev.un.thread.attribute);
+ else
+ tprintf("{...}");
+ tprintf("}");
+ }
+}
+#endif
+
void
-printsigevent(tcp, arg)
-struct tcb *tcp;
-long arg;
+printsigevent(struct tcb *tcp, long arg)
{
struct sigevent sev;
+
+#if SUPPORTED_PERSONALITIES > 1
+ if (personality_wordsize[current_personality] == 4)
+ {
+ printsigevent32(tcp, arg);
+ return;
+ }
+#endif
if (umove (tcp, arg, &sev) < 0)
tprintf("{...}");
else {