mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Make nulldrv a small C++ program
This commit is contained in:
@@ -1 +1,22 @@
|
||||
int main(int argc, const char **argv) { return 0; }
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern "C" {
|
||||
int32_t getpid();
|
||||
void sleep(uint64_t til);
|
||||
void debug();
|
||||
|
||||
int main(int, const char **);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
int32_t pid = getpid();
|
||||
debug();
|
||||
for (int i = 1; i < 5; ++i)
|
||||
sleep(i*10);
|
||||
debug();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user