Skip to content
Snippets Groups Projects
linux.cc 343 B
Newer Older
  • Learn to ignore specific revisions
  • #include "debug.hh"
    
    #include <boost/format.hpp>
    
    Avi Kivity's avatar
    Avi Kivity committed
    #include "sched.hh"
    
    #include <syscall.h>
    
    long gettid()
    {
    
    Avi Kivity's avatar
    Avi Kivity committed
        return sched::thread::current()->id();
    
    long syscall(long number, ...)
    {
    
        switch (number) {
        case __NR_gettid: return gettid();
        }
    
    
    Avi Kivity's avatar
    Avi Kivity committed
        debug(fmt("unimplemented syscall %d\n") % number);