refactoring

This commit is contained in:
Devaev Maxim
2019-03-18 21:43:23 +03:00
parent 73ceba77a8
commit 7fbeca41fa
2 changed files with 8 additions and 6 deletions

View File

@@ -25,12 +25,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <errno.h>
#include <math.h>
#include <pthread.h>
#include <time.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
@@ -102,3 +104,7 @@ INLINE long double get_now_real(void) {
get_now(CLOCK_REALTIME, &sec, &msec);
return (long double)sec + ((long double)msec) / 1000;
}
INLINE pid_t get_thread_id(void) {
return syscall(SYS_gettid);
}