/frameworks/native/libs/binder/ |
H A D | IPCThreadState.cpp | 498 int fd = mProcess->mDriverFD; local 500 close(fd);
|
H A D | MemoryHeapBase.cpp | 55 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); local 56 ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno)); 57 if (fd >= 0) { 58 if (mapfd(fd, size) == NO_ERROR) { 60 ashmem_set_prot_region(fd, PROT_READ); 74 int fd = open(device, open_flags); local 75 ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno)); 76 if (fd >= 0) { 79 if (mapfd(fd, size) == NO_ERROR) { 85 MemoryHeapBase::MemoryHeapBase(int fd, size_ argument 94 init(int fd, void *base, int size, int flags, const char* device) argument 107 mapfd(int fd, size_t size, uint32_t offset) argument 155 int fd = android_atomic_or(-1, &mFD); local [all...] |
H A D | Parcel.cpp | 435 // new Parcel now owns its own fd, and can declare that we 706 ALOGD("write native handle, write dup fd failed"); 713 status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) argument 718 obj.handle = fd; 723 status_t Parcel::writeDupFileDescriptor(int fd) argument 725 int dupFd = dup(fd); 753 int fd = ashmem_create_region("Parcel Blob", len); local 754 if (fd < 0) return NO_MEMORY; 756 int result = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE); 760 void* ptr = ::mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 1123 int fd = readFileDescriptor(); local [all...] |
H A D | ProcessState.cpp | 309 int fd = open("/dev/binder", O_RDWR); local 310 if (fd >= 0) { 311 fcntl(fd, F_SETFD, FD_CLOEXEC); 313 status_t result = ioctl(fd, BINDER_VERSION, &vers); 316 close(fd); 317 fd = -1; 321 close(fd); 322 fd = -1; 325 result = ioctl(fd, BINDER_SET_MAX_THREADS, &maxThreads); 332 return fd; [all...] |
/frameworks/native/libs/cpustats/ |
H A D | ThreadCpuUsage.cpp | 175 int fd = open("/sys/devices/system/cpu/kernel_max", O_RDONLY); local 176 if (fd >= 0) { 179 ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); 195 (void) close(fd); 211 // double-checked locking idiom is not broken for atomic values such as fd 212 int fd = sScalingFds[cpuNum]; local 213 if (fd < 0) { 216 fd = sScalingFds[cpuNum]; 217 if (fd < 0) { 225 fd [all...] |
/frameworks/native/libs/gui/ |
H A D | SensorEventQueue.cpp | 79 const int fd = getFd(); local 97 } while (result != fd); 99 return (result == fd) ? status_t(NO_ERROR) : result;
|
/frameworks/native/libs/utils/ |
H A D | FileMap.cpp | 87 * claim ownership of the fd. 91 bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t length, argument 108 mFileHandle = (HANDLE) _get_osfhandle(fd); 141 assert(fd >= 0); 169 ptr = mmap(NULL, adjLength, prot, flags, fd, adjOffset);
|
H A D | Looper.cpp | 53 int SimpleLooperCallback::handleEvent(int fd, int events, void* data) { argument 54 return mCallback(fd, events, data); 94 eventItem.data.fd = mWakeReadPipeFd; 164 int fd = response.request.fd; local 169 "fd=%d, events=0x%x, data=%p", 170 this, ident, fd, events, data); 172 if (outFd != NULL) *outFd = fd; 248 int fd = eventItems[i].data.fd; local 314 int fd = response.request.fd; local 396 addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) argument 400 addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data) argument 458 removeFd(int fd) argument [all...] |
H A D | Static.cpp | 69 FdTextOutput(int fd) : BufferedTextOutput(MULTITHREADED), mFD(fd) { } argument
|
H A D | SystemClock.cpp | 55 int fd; 70 fd = open("/dev/alarm", O_RDWR); 71 if(fd < 0) { 77 res = ioctl(fd, ANDROID_ALARM_SET_RTC, &ts); 82 close(fd); 180 int fd = open("/dev/alarm", O_RDONLY); local 181 if (android_atomic_cmpxchg(-1, fd, &s_fd)) { 182 close(fd);
|
H A D | Tokenizer.cpp | 58 int fd = ::open(filename.string(), O_RDONLY); local 59 if (fd < 0) { 64 if (fstat(fd, &stat)) { 73 if (fileMap->create(NULL, fd, 0, length, true)) { 85 ssize_t nrd = read(fd, buffer, length); 100 close(fd);
|
H A D | ZipFileCRO.cpp | 50 bool ZipFileCRO_uncompressEntry(ZipFileCRO zipToken, ZipEntryRO entryToken, int fd) { argument 53 return zip->uncompressEntry(entry, fd);
|
H A D | ZipFileRO.cpp | 136 int fd = -1; local 143 fd = TEMP_FAILURE_RETRY(::open(zipFileName, O_RDONLY | O_BINARY)); 144 if (fd < 0) { 149 mFileLength = lseek64(fd, 0, SEEK_END); 151 TEMP_FAILURE_RETRY(close(fd)); 160 mFd = fd; 181 TEMP_FAILURE_RETRY(close(fd)); 752 bool ZipFileRO::uncompressEntry(ZipEntryRO entry, int fd) const 774 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, ptr, uncompLen)); 786 if (!inflateBuffer(fd, pt 866 inflateBuffer(int fd, const void* inBuf, size_t uncompLen, size_t compLen) argument [all...] |
H A D | ZipUtils.cpp | 39 * "fd" is an open file positioned at the start of the "deflate" data 42 /*static*/ bool ZipUtils::inflateToBuffer(int fd, void* buf, argument 101 int cc = read(fd, readBuf, getSize); 148 * of an fd. We could pass fileno(fd) to the above, but we can run into 149 * trouble when "fp" has a different notion of what fd's file position is.)
|
/frameworks/native/libs/utils/tests/ |
H A D | Looper_test.cpp | 56 void setCallback(const sp<Looper>& looper, int fd, int events) { argument 57 looper->addFd(fd, 0, events, staticHandler, this); 63 virtual int handler(int fd, int events) = 0; 66 static int staticHandler(int fd, int events, void* data) { argument 67 return static_cast<CallbackHandler*>(data)->handler(fd, events); 76 int fd; member in class:android::StubCallbackHandler 80 callbackCount(0), fd(-1), events(-1) { 84 virtual int handler(int fd, int events) { argument 86 this->fd = fd; 345 int fd; local [all...] |
/frameworks/native/opengl/libs/EGL/ |
H A D | egl_cache.cpp | 227 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); local 228 if (fd == -1) { 238 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); 240 if (fd == -1) { 253 close(fd); 264 close(fd); 274 if (write(fd, buf, fileSize) == -1) { 278 close(fd); 284 fchmod(fd, S_IRUSR); 285 close(fd); 293 int fd = open(mFilename.string(), O_RDONLY, 0); local [all...] |
/frameworks/native/services/sensorservice/ |
H A D | SensorService.cpp | 191 status_t SensorService::dump(int fd, const Vector<String16>& args) argument 236 write(fd, result.string(), result.size());
|
H A D | SensorService.h | 68 virtual status_t dump(int fd, const Vector<String16>& args);
|
/frameworks/native/services/sensorservice/tests/ |
H A D | sensorservicetest.cpp | 28 int receiver(int fd, int events, void* data) argument
|
/frameworks/native/services/surfaceflinger/ |
H A D | DisplayDevice.cpp | 247 int fd = hwc.getAndResetReleaseFenceFd(mType); local 248 mFramebufferSurface->setReleaseFenceFd(fd);
|
H A D | MessageQueue.cpp | 162 int MessageQueue::cb_eventReceiver(int fd, int events, void* data) { argument 164 return queue->eventReceiver(fd, events); 167 int MessageQueue::eventReceiver(int fd, int events) { argument
|
H A D | MessageQueue.h | 87 static int cb_eventReceiver(int fd, int events, void* data); 88 int eventReceiver(int fd, int events);
|
H A D | SurfaceFlinger.cpp | 2122 status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) argument 2184 write(fd, result.string(), result.size());
|
H A D | SurfaceFlinger.h | 185 virtual status_t dump(int fd, const Vector<String16>& args);
|
/frameworks/native/services/surfaceflinger/DisplayHardware/ |
H A D | HWComposer.cpp | 639 int fd = INVALID_OPERATION; local 643 fd = disp.framebufferTarget->releaseFenceFd; 648 return fd; 799 int fd = getLayer()->releaseFenceFd; local 801 return fd;
|