mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
63b1969fbb
git-svn-id: file:///svn/toku/tokudb@43179 c7de825b-a66e-492c-adef-691d508d4ae1
24 lines
518 B
C
24 lines
518 B
C
#include <config.h>
|
|
#include <stdio.h>
|
|
#include <toku_stdint.h>
|
|
#include <unistd.h>
|
|
#include <toku_assert.h>
|
|
#include "toku_os.h"
|
|
#if defined(HAVE_SYSCALL_H)
|
|
# include <syscall.h>
|
|
#elif defined(HAVE_SYS_SYSCALL_H)
|
|
# include <sys/syscall.h>
|
|
# if !defined(__NR_gettid) && defined(SYS_gettid)
|
|
# define __NR_gettid SYS_gettid
|
|
# endif
|
|
#endif
|
|
|
|
static int gettid(void) {
|
|
return syscall(__NR_gettid);
|
|
}
|
|
|
|
int main(void) {
|
|
assert(toku_os_getpid() == getpid());
|
|
assert(toku_os_gettid() == gettid());
|
|
return 0;
|
|
}
|