VirtualBox

source: kBuild/trunk/src/kmk/kbuildprf.c@ 2132

Last change on this file since 2132 was 1262, checked in by bird, 17 years ago

for profiling window on windows.

File size: 837 bytes
Line 
1#include <stdio.h>
2#include <io.h>
3#include <errno.h>
4#include <Windows.h>
5
6__int64 prf_now(void)
7{
8 return GetTickCount();
9}
10
11#undef open
12int prf_open(const char *name, int of, int mask)
13{
14 int fd;
15// int err;
16// __int64 t = prf_now();
17 fd = _open(name, of, mask);
18// err = errno;
19// t = prf_now() - t;
20// fprintf(stderr, "open(%s, %#x) -> %d/%d in %lu\n", name, of, fd, err, (long)t);
21// errno = err;
22 return fd;
23}
24
25#undef close
26int prf_close(int fd)
27{
28 int rc;
29 rc = _close(fd);
30 return rc;
31}
32
33
34#undef read
35int prf_read(int fd, void *buf, long cb)
36{
37 int cbRead;
38 cbRead = _read(fd, buf, cb);
39 return cbRead;
40}
41
42#undef lseek
43long prf_lseek(int fd, long off, int whence)
44{
45 long rc;
46 rc = _lseek(fd, off, whence);
47 return rc;
48}
49
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette