mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
3a208cebc4
git-svn-id: file:///svn/toku/tokudb@43762 c7de825b-a66e-492c-adef-691d508d4ae1
26 lines
625 B
C
26 lines
625 B
C
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
// vim: expandtab:ts=8:sw=4:softtabstop=4:
|
|
#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;
|
|
}
|