diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2015-09-05 15:20:21 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2015-09-05 15:20:21 +0200 |
commit | 17258f5f27dd3dd57c36f2805e0a0c27a1aeabba (patch) | |
tree | 4777f9f0fc2863380467f900887697e09c07272d /src/basic/macro.h | |
parent | c7430c3d1a0c14aed631864b9da504ba1a9352c2 (diff) | |
parent | a67c56bff419afc16547f16df1ad1bbe0efe84a6 (diff) |
Merge pull request #1140 from poettering/sd-event-signals
A variety of sd-event, sd-login and cgroup fixes
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 627d768b76..cbc3ca97b8 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -298,6 +298,9 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { #define PTR_TO_GID(p) ((gid_t) (((uintptr_t) (p))-1)) #define GID_TO_PTR(u) ((void*) (((uintptr_t) (u))+1)) +#define PTR_TO_PID(p) ((pid_t) ((uintptr_t) p)) +#define PID_TO_PTR(p) ((void*) ((uintptr_t) p)) + #define memzero(x,l) (memset((x), 0, (l))) #define zero(x) (memzero(&(x), sizeof(x))) |