process-util: add getpid_cached() as a caching wrapper for getpid()

Let's make getpid() fast again.
This commit is contained in:
Lennart Poettering
2017-07-20 20:27:24 +02:00
parent f7a2b4213c
commit 5c30a6d2b8
3 changed files with 121 additions and 0 deletions
+2
View File
@@ -119,3 +119,5 @@ static inline bool ioprio_priority_is_valid(int i) {
}
int ioprio_parse_priority(const char *s, int *ret);
pid_t getpid_cached(void);