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

Side by Side Diff: libraries/nacl-mounts/pepper/PepperMount.cc

Issue 10392070: Socket subsystem implementation (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 6 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 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #include <assert.h> 6 #include <assert.h>
7 #include <errno.h> 7 #include <errno.h>
8 #include <ppapi/c/pp_file_info.h> 8 #include <ppapi/c/pp_file_info.h>
9 #include <ppapi/c/ppb_file_io.h> 9 #include <ppapi/c/ppb_file_io.h>
10 #include <ppapi/cpp/file_io.h> 10 #include <ppapi/cpp/file_io.h>
11 #include <ppapi/cpp/file_ref.h> 11 #include <ppapi/cpp/file_ref.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 #include "../base/MainThreadRunner.h" 13 #include "../base/MainThreadRunner.h"
14 #include "../util/Path.h" 14 #include "../util/Path.h"
15 #include "../util/SimpleAutoLock.h" 15 #include "../util/PthreadHelpers.h"
16 #include "../util/DebugPrint.h" 16 #include "../util/DebugPrint.h"
17 #include "PepperFileIOJob.h" 17 #include "PepperFileIOJob.h"
18 #include "PepperMount.h" 18 #include "PepperMount.h"
19 #include "PepperNode.h" 19 #include "PepperNode.h"
20 20
21 PepperMount::PepperMount(MainThreadRunner *runner, pp::FileSystem *fs, 21 PepperMount::PepperMount(MainThreadRunner *runner, pp::FileSystem *fs,
22 int64_t exp_size) { 22 int64_t exp_size) {
23 if (pthread_mutex_init(&pp_lock_, NULL)) assert(0); 23 if (pthread_mutex_init(&pp_lock_, NULL)) assert(0);
24 runner_ = runner; 24 runner_ = runner;
25 fs_ = fs; 25 fs_ = fs;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // will return null if d_ino is zero. 334 // will return null if d_ino is zero.
335 dir->d_ino = 0x60061E; 335 dir->d_ino = 0x60061E;
336 dir->d_off = sizeof(struct dirent); 336 dir->d_off = sizeof(struct dirent);
337 dir->d_reclen = sizeof(struct dirent); 337 dir->d_reclen = sizeof(struct dirent);
338 strncpy(dir->d_name, it->c_str(), sizeof(dir->d_name)); 338 strncpy(dir->d_name, it->c_str(), sizeof(dir->d_name));
339 ++dir; 339 ++dir;
340 bytes_read += sizeof(struct dirent); 340 bytes_read += sizeof(struct dirent);
341 } 341 }
342 return bytes_read; 342 return bytes_read;
343 } 343 }
OLDNEW
« no previous file with comments | « libraries/nacl-mounts/net/newlib_compat.h ('k') | libraries/nacl-mounts/ppapi/c/private/ppb_host_resolver_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698