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

Side by Side Diff: chromeos/binder/driver.cc

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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
« no previous file with comments | « chromeos/binder/driver.h ('k') | chromeos/binder/status.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chromeos/binder/driver.h" 5 #include "chromeos/binder/driver.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/android/binder.h> 9 #include <linux/android/binder.h>
10 #include <stddef.h>
10 #include <sys/ioctl.h> 11 #include <sys/ioctl.h>
11 #include <sys/mman.h> 12 #include <sys/mman.h>
12 #include <sys/user.h> 13 #include <sys/user.h>
13 14
14 #include "base/posix/eintr_wrapper.h" 15 #include "base/posix/eintr_wrapper.h"
15 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
16 17
17 namespace binder { 18 namespace binder {
18 19
19 namespace { 20 namespace {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::ThreadRestrictions::AssertIOAllowed(); 101 base::ThreadRestrictions::AssertIOAllowed();
101 return HANDLE_EINTR(ioctl(fd_.get(), BINDER_THREAD_EXIT, 0)) != -1; 102 return HANDLE_EINTR(ioctl(fd_.get(), BINDER_THREAD_EXIT, 0)) != -1;
102 } 103 }
103 104
104 size_t Driver::GetBinderMmapSize() const { 105 size_t Driver::GetBinderMmapSize() const {
105 // Subtract PAGESIZE * 2 to make room for guard pages. https://goo.gl/4Q6sPe 106 // Subtract PAGESIZE * 2 to make room for guard pages. https://goo.gl/4Q6sPe
106 return 1024 * 1024 - sysconf(_SC_PAGESIZE) * 2; 107 return 1024 * 1024 - sysconf(_SC_PAGESIZE) * 2;
107 } 108 }
108 109
109 } // namespace binder 110 } // namespace binder
OLDNEW
« no previous file with comments | « chromeos/binder/driver.h ('k') | chromeos/binder/status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698