Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc

Issue 19271009: [NaCl SDK} Add EventListener and EventEmitter to support epoll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The entire file is wrapped in this #if. We do this so this .cc file can be 5 // The entire file is wrapped in this #if. We do this so this .cc file can be
6 // compiled, even on a non-Windows build. 6 // compiled, even on a non-Windows build.
7 #if defined(WIN32) 7 #if defined(WIN32)
8 8
9 #include "nacl_io/kernel_wrap.h" 9 #include "nacl_io/kernel_wrap.h"
10 #include <errno.h> 10 #include <errno.h>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 int _real_rmdir(const char* pathname) { 301 int _real_rmdir(const char* pathname) {
302 return ENOSYS; 302 return ENOSYS;
303 } 303 }
304 304
305 int _real_write(int fd, const void *buf, size_t count, size_t *nwrote) { 305 int _real_write(int fd, const void *buf, size_t count, size_t *nwrote) {
306 *nwrote = count; 306 *nwrote = count;
307 return 0; 307 return 0;
308 } 308 }
309 309
310 #define USECS_FROM_WIN_TO_TO_UNIX_EPOCH 11644473600000LL
311 uint64_t usec_since_epoch() {
312 FILETIME ft;
313 ULARGE_INTEGER ularge;
314 GetSystemTimeAsFileTime(&ft);
315
316 ularge.LowPart = ft.dwLowDateTime;
317 ularge.HighPart = ft.dwHighDateTime;
318
319 // Truncate to usec resolution.
320 return usecs = ularge.QuadPart / 10;
321 }
322
310 // Do nothing for Windows, we replace the library at link time. 323 // Do nothing for Windows, we replace the library at link time.
311 void kernel_wrap_init() { 324 void kernel_wrap_init() {
312 } 325 }
313 EXTERN_C_END 326 EXTERN_C_END
314 327
315 #endif // defined(WIN32) 328 #endif // defined(WIN32)
316 329
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc ('k') | native_client_sdk/src/libraries/nacl_io/library.dsc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698