[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 51/64: proc: add payload-aware intrans functions
From: |
Samuel Thibault |
Subject: |
[hurd] 51/64: proc: add payload-aware intrans functions |
Date: |
Wed, 10 Dec 2014 15:17:07 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 07db92f65a7b49f97bc43ed94ff02586b75e21c6
Author: Justus Winter <address@hidden>
Date: Thu Nov 28 10:31:08 2013 +0100
proc: add payload-aware intrans functions
* proc/mig-decls.h (begin_using_proc_payload): New function.
(begin_using_exc_payload): Likewise.
* proc/mig-mutate.h: Add mutators.
* proc/proc_exc.defs (exception_t): Add payload-aware in-translator
function.
---
proc/mig-decls.h | 17 +++++++++++++++++
proc/mig-mutate.h | 4 ++++
proc/proc_exc.defs | 1 +
3 files changed, 22 insertions(+)
diff --git a/proc/mig-decls.h b/proc/mig-decls.h
index 7d36a87..eb33ef3 100644
--- a/proc/mig-decls.h
+++ b/proc/mig-decls.h
@@ -35,6 +35,17 @@ begin_using_proc_port (mach_port_t port)
return (!p || p->p_dead) ? NULL : p;
}
+static inline struct proc * __attribute__ ((unused))
+begin_using_proc_payload (unsigned long payload)
+{
+ struct proc *p;
+ p = ports_lookup_payload (proc_bucket, payload, proc_class);
+ if (p && p->p_dead)
+ ports_port_deref (p);
+ return (!p || p->p_dead) ? 0 : p;
+}
+
+
static inline void __attribute__ ((unused))
end_using_proc (struct proc *p)
{
@@ -50,6 +61,12 @@ begin_using_exc_port (mach_port_t port)
return ports_lookup_port (NULL, port, exc_class);
}
+static inline exc_t __attribute__ ((unused))
+begin_using_exc_payload (unsigned long payload)
+{
+ return ports_lookup_payload (NULL, payload, exc_class);
+}
+
static inline void __attribute__ ((unused))
end_using_exc (exc_t exc)
{
diff --git a/proc/mig-mutate.h b/proc/mig-mutate.h
index ce9f88e..62dc2a5 100644
--- a/proc/mig-mutate.h
+++ b/proc/mig-mutate.h
@@ -20,6 +20,8 @@
#define PROCESS_INTRAN \
pstruct_t begin_using_proc_port (process_t)
+#define PROCESS_INTRAN_PAYLOAD \
+ pstruct_t begin_using_proc_payload
#define PROCESS_DESTRUCTOR \
end_using_proc (pstruct_t)
#define PROCESS_IMPORTS \
@@ -27,6 +29,8 @@
#define NOTIFY_INTRAN \
port_info_t begin_using_port_info_port (mach_port_t)
+#define NOTIFY_INTRAN_PAYLOAD \
+ port_info_t begin_using_port_info_payload
#define NOTIFY_DESTRUCTOR \
end_using_port_info (port_info_t)
#define NOTIFY_IMPORTS \
diff --git a/proc/proc_exc.defs b/proc/proc_exc.defs
index c910824..9dc3626 100644
--- a/proc/proc_exc.defs
+++ b/proc/proc_exc.defs
@@ -38,6 +38,7 @@ import "mig-decls.h";
type exception_t = mach_port_copy_send_t
cusertype: mach_port_t
intran: exc_t begin_using_exc_port (exception_t)
+ intranpayload: exc_t begin_using_exc_payload
destructor: end_using_exc (exc_t);
routine proc_exception_raise (
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 19/64: startup: fix the declaration of the *_server functions, (continued)
- [hurd] 19/64: startup: fix the declaration of the *_server functions, Samuel Thibault, 2014/12/10
- [hurd] 43/64: libcons: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 46/64: console-client: make the demuxer payload-aware, Samuel Thibault, 2014/12/10
- [hurd] 41/64: libtrivfs: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 20/64: startup: bind the startup server to /servers/startup, Samuel Thibault, 2014/12/10
- [hurd] 28/64: boot: implement pseudo-time device, Samuel Thibault, 2014/12/10
- [hurd] 47/64: exec: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 49/64: pfinet: make the demuxers payload-aware, Samuel Thibault, 2014/12/10
- [hurd] 50/64: pflocal: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 48/64: pfinet: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 51/64: proc: add payload-aware intrans functions,
Samuel Thibault <=
- [hurd] 24/64: boot: drop bootstrap compat code, Samuel Thibault, 2014/12/10
- [hurd] 52/64: startup: disable default payload to port mapping, Samuel Thibault, 2014/12/10
- [hurd] 55/64: trans/ifsock: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 27/64: boot: support ds_device_get_status with flavor DEV_GET_RECORDS, Samuel Thibault, 2014/12/10
- [hurd] 35/64: libshouldbeinlibc: move the reference counting primitives here, Samuel Thibault, 2014/12/10
- [hurd] 56/64: trans/password: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 36/64: Fix coding style, Samuel Thibault, 2014/12/10
- [hurd] 38/64: libports: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 58/64: trans/symlink: disable default payload to port mapping, Samuel Thibault, 2014/12/10
- [hurd] 34/64: Revert "random: fix a receiver lookup", Samuel Thibault, 2014/12/10