am ed4d28dd: Add method to apply offset to PointerCoords. (DO NOT MERGE)
* commit 'ed4d28dd70448b13eb74a3166ec8d1c1a530e2d4':
Add method to apply offset to PointerCoords. (DO NOT MERGE)
diff --git a/cmds/idmap/Android.mk b/cmds/idmap/Android.mk
new file mode 100644
index 0000000..ffa83f2
--- /dev/null
+++ b/cmds/idmap/Android.mk
@@ -0,0 +1,28 @@
+# Copyright (C) 2012 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := idmap.cpp create.cpp scan.cpp inspect.cpp
+
+LOCAL_SHARED_LIBRARIES := liblog libutils libandroidfw
+
+LOCAL_MODULE := idmap
+
+LOCAL_C_INCLUDES := external/zlib
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp
new file mode 100644
index 0000000..ae35f7b
--- /dev/null
+++ b/cmds/idmap/create.cpp
@@ -0,0 +1,222 @@
+#include "idmap.h"
+
+#include <UniquePtr.h>
+#include <androidfw/AssetManager.h>
+#include <androidfw/ResourceTypes.h>
+#include <androidfw/ZipFileRO.h>
+#include <utils/String8.h>
+
+#include <fcntl.h>
+#include <sys/stat.h>
+
+using namespace android;
+
+namespace {
+ int get_zip_entry_crc(const char *zip_path, const char *entry_name, uint32_t *crc)
+ {
+ UniquePtr<ZipFileRO> zip(ZipFileRO::open(zip_path));
+ if (zip.get() == NULL) {
+ return -1;
+ }
+ ZipEntryRO entry = zip->findEntryByName(entry_name);
+ if (entry == NULL) {
+ return -1;
+ }
+ if (!zip->getEntryInfo(entry, NULL, NULL, NULL, NULL, NULL, (long*)crc)) {
+ return -1;
+ }
+ zip->releaseEntry(entry);
+ return 0;
+ }
+
+ int open_idmap(const char *path)
+ {
+ int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644));
+ if (fd == -1) {
+ ALOGD("error: open %s: %s\n", path, strerror(errno));
+ goto fail;
+ }
+ if (fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) {
+ ALOGD("error: fchmod %s: %s\n", path, strerror(errno));
+ goto fail;
+ }
+ if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX | LOCK_NB)) != 0) {
+ ALOGD("error: flock %s: %s\n", path, strerror(errno));
+ goto fail;
+ }
+
+ return fd;
+fail:
+ if (fd != -1) {
+ close(fd);
+ unlink(path);
+ }
+ return -1;
+ }
+
+ int write_idmap(int fd, const uint32_t *data, size_t size)
+ {
+ if (lseek(fd, SEEK_SET, 0) < 0) {
+ return -1;
+ }
+ size_t bytesLeft = size;
+ while (bytesLeft > 0) {
+ ssize_t w = TEMP_FAILURE_RETRY(write(fd, data + size - bytesLeft, bytesLeft));
+ if (w < 0) {
+ fprintf(stderr, "error: write: %s\n", strerror(errno));
+ return -1;
+ }
+ bytesLeft -= w;
+ }
+ return 0;
+ }
+
+ bool is_idmap_stale_fd(const char *target_apk_path, const char *overlay_apk_path, int idmap_fd)
+ {
+ static const size_t N = ResTable::IDMAP_HEADER_SIZE_BYTES;
+ struct stat st;
+ if (fstat(idmap_fd, &st) == -1) {
+ return true;
+ }
+ if (st.st_size < N) {
+ // file is empty or corrupt
+ return true;
+ }
+
+ char buf[N];
+ ssize_t bytesLeft = N;
+ if (lseek(idmap_fd, SEEK_SET, 0) < 0) {
+ return true;
+ }
+ for (;;) {
+ ssize_t r = TEMP_FAILURE_RETRY(read(idmap_fd, buf + N - bytesLeft, bytesLeft));
+ if (r < 0) {
+ return true;
+ }
+ bytesLeft -= r;
+ if (bytesLeft == 0) {
+ break;
+ }
+ if (r == 0) {
+ // "shouldn't happen"
+ return true;
+ }
+ }
+
+ uint32_t cached_target_crc, cached_overlay_crc;
+ String8 cached_target_path, cached_overlay_path;
+ if (!ResTable::getIdmapInfo(buf, N, &cached_target_crc, &cached_overlay_crc,
+ &cached_target_path, &cached_overlay_path)) {
+ return true;
+ }
+
+ if (cached_target_path != target_apk_path) {
+ return true;
+ }
+ if (cached_overlay_path != overlay_apk_path) {
+ return true;
+ }
+
+ uint32_t actual_target_crc, actual_overlay_crc;
+ if (get_zip_entry_crc(target_apk_path, AssetManager::RESOURCES_FILENAME,
+ &actual_target_crc) == -1) {
+ return true;
+ }
+ if (get_zip_entry_crc(overlay_apk_path, AssetManager::RESOURCES_FILENAME,
+ &actual_overlay_crc) == -1) {
+ return true;
+ }
+
+ return cached_target_crc != actual_target_crc || cached_overlay_crc != actual_overlay_crc;
+ }
+
+ bool is_idmap_stale_path(const char *target_apk_path, const char *overlay_apk_path,
+ const char *idmap_path)
+ {
+ struct stat st;
+ if (stat(idmap_path, &st) == -1) {
+ // non-existing idmap is always stale; on other errors, abort idmap generation
+ return errno == ENOENT;
+ }
+
+ int idmap_fd = TEMP_FAILURE_RETRY(open(idmap_path, O_RDONLY));
+ if (idmap_fd == -1) {
+ return false;
+ }
+ bool is_stale = is_idmap_stale_fd(target_apk_path, overlay_apk_path, idmap_fd);
+ close(idmap_fd);
+ return is_stale;
+ }
+
+ int create_idmap(const char *target_apk_path, const char *overlay_apk_path,
+ uint32_t **data, size_t *size)
+ {
+ uint32_t target_crc, overlay_crc;
+ if (get_zip_entry_crc(target_apk_path, AssetManager::RESOURCES_FILENAME,
+ &target_crc) == -1) {
+ return -1;
+ }
+ if (get_zip_entry_crc(overlay_apk_path, AssetManager::RESOURCES_FILENAME,
+ &overlay_crc) == -1) {
+ return -1;
+ }
+
+ AssetManager am;
+ bool b = am.createIdmap(target_apk_path, overlay_apk_path, target_crc, overlay_crc,
+ data, size);
+ return b ? 0 : -1;
+ }
+
+ int create_and_write_idmap(const char *target_apk_path, const char *overlay_apk_path,
+ int fd, bool check_if_stale)
+ {
+ if (check_if_stale) {
+ if (!is_idmap_stale_fd(target_apk_path, overlay_apk_path, fd)) {
+ // already up to date -- nothing to do
+ return 0;
+ }
+ }
+
+ uint32_t *data = NULL;
+ size_t size;
+
+ if (create_idmap(target_apk_path, overlay_apk_path, &data, &size) == -1) {
+ return -1;
+ }
+
+ if (write_idmap(fd, data, size) == -1) {
+ free(data);
+ return -1;
+ }
+
+ free(data);
+ return 0;
+ }
+}
+
+int idmap_create_path(const char *target_apk_path, const char *overlay_apk_path,
+ const char *idmap_path)
+{
+ if (!is_idmap_stale_path(target_apk_path, overlay_apk_path, idmap_path)) {
+ // already up to date -- nothing to do
+ return EXIT_SUCCESS;
+ }
+
+ int fd = open_idmap(idmap_path);
+ if (fd == -1) {
+ return EXIT_FAILURE;
+ }
+
+ int r = create_and_write_idmap(target_apk_path, overlay_apk_path, fd, false);
+ close(fd);
+ if (r != 0) {
+ unlink(idmap_path);
+ }
+ return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
+int idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd)
+{
+ return create_and_write_idmap(target_apk_path, overlay_apk_path, fd, true) == 0 ?
+ EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/cmds/idmap/idmap.cpp b/cmds/idmap/idmap.cpp
new file mode 100644
index 0000000..46c0edc
--- /dev/null
+++ b/cmds/idmap/idmap.cpp
@@ -0,0 +1,237 @@
+#include "idmap.h"
+
+#include <private/android_filesystem_config.h> // for AID_SYSTEM
+
+#include <stdlib.h>
+#include <string.h>
+
+namespace {
+ const char *usage = "NAME\n\
+ idmap - create or display idmap files\n\
+\n\
+SYNOPSIS \n\
+ idmap --help \n\
+ idmap --fd target overlay fd \n\
+ idmap --path target overlay idmap \n\
+ idmap --scan dir-to-scan target-to-look-for target dir-to-hold-idmaps \n\
+ idmap --inspect idmap \n\
+\n\
+DESCRIPTION \n\
+ Idmap files play an integral part in the runtime resource overlay framework. An idmap \n\
+ file contains a mapping of resource identifiers between overlay package and its target \n\
+ package; this mapping is used during resource lookup. Idmap files also act as control \n\
+ files by their existence: if not present, the corresponding overlay package is ignored \n\
+ when the resource context is created. \n\
+\n\
+ Idmap files are stored in /data/resource-cache. For each pair (target package, overlay \n\
+ package), there exists exactly one idmap file, or none if the overlay should not be used. \n\
+\n\
+NOMENCLATURE \n\
+ target: the original, non-overlay, package. Each target package may be associated with \n\
+ any number of overlay packages. \n\
+\n\
+ overlay: an overlay package. Each overlay package is associated with exactly one target \n\
+ package, specified in the overlay's manifest using the <overlay target=\"...\"/> \n\
+ tag. \n\
+\n\
+OPTIONS \n\
+ --help: display this help \n\
+\n\
+ --fd: create idmap for target package 'target' (path to apk) and overlay package 'overlay' \n\
+ (path to apk); write results to file descriptor 'fd' (integer). This invocation \n\
+ version is intended to be used by a parent process with higher privileges to call \n\
+ idmap in a controlled way: the parent will open a suitable file descriptor, fork, \n\
+ drop its privileges and exec. This tool will continue execution without the extra \n\
+ privileges, but still have write access to a file it could not have opened on its \n\
+ own. \n\
+\n\
+ --path: create idmap for target package 'target' (path to apk) and overlay package \n\
+ 'overlay' (path to apk); write results to 'idmap' (path). \n\
+\n\
+ --scan: non-recursively search directory 'dir-to-scan' (path) for overlay packages with \n\
+ target package 'target-to-look-for' (package name) present at 'target' (path to \n\
+ apk). For each overlay package found, create an idmap file in 'dir-to-hold-idmaps' \n\
+ (path). \n\
+\n\
+ --inspect: decode the binary format of 'idmap' (path) and display the contents in a \n\
+ debug-friendly format. \n\
+\n\
+EXAMPLES \n\
+ Create an idmap file: \n\
+\n\
+ $ adb shell idmap --path /system/app/target.apk \\ \n\
+ /vendor/overlay/overlay.apk \\ \n\
+ /data/resource-cache/vendor@overlay@overlay.apk@idmap \n\
+\n\
+ Display an idmap file: \n\
+\n\
+ $ adb shell idmap --inspect /data/resource-cache/vendor@overlay@overlay.apk@idmap \n\
+ SECTION ENTRY VALUE OFFSET COMMENT \n\
+ IDMAP HEADER magic 0x706d6469 0x0 \n\
+ base crc 0x484aa77f 0x1 \n\
+ overlay crc 0x03c66fa5 0x2 \n\
+ base path .......... 0x03-0x42 /system/app/target.apk \n\
+ overlay path .......... 0x43-0x82 /vendor/overlay/overlay.apk \n\
+ DATA HEADER types count 0x00000003 0x83 \n\
+ padding 0x00000000 0x84 \n\
+ type offset 0x00000004 0x85 absolute offset 0x87, xml \n\
+ type offset 0x00000007 0x86 absolute offset 0x8a, string \n\
+ DATA BLOCK entry count 0x00000001 0x87 \n\
+ entry offset 0x00000000 0x88 \n\
+ entry 0x7f020000 0x89 xml/integer \n\
+ DATA BLOCK entry count 0x00000002 0x8a \n\
+ entry offset 0x00000000 0x8b \n\
+ entry 0x7f030000 0x8c string/str \n\
+ entry 0x7f030001 0x8d string/str2 \n\
+\n\
+ In this example, the overlay package provides three alternative resource values:\n\
+ xml/integer, string/str and string/str2.\n\
+\n\
+NOTES \n\
+ This tool and its expected invocation from installd is modelled on dexopt.";
+
+ bool verify_directory_readable(const char *path)
+ {
+ return access(path, R_OK | X_OK) == 0;
+ }
+
+ bool verify_directory_writable(const char *path)
+ {
+ return access(path, W_OK) == 0;
+ }
+
+ bool verify_file_readable(const char *path)
+ {
+ return access(path, R_OK) == 0;
+ }
+
+ bool verify_root_or_system()
+ {
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+
+ return (uid == 0 && gid == 0) || (uid == AID_SYSTEM && gid == AID_SYSTEM);
+ }
+
+ int maybe_create_fd(const char *target_apk_path, const char *overlay_apk_path,
+ const char *idmap_str)
+ {
+ // anyone (not just root or system) may do --fd -- the file has
+ // already been opened by someone else on our behalf
+
+ char *endptr;
+ int idmap_fd = strtol(idmap_str, &endptr, 10);
+ if (*endptr != '\0') {
+ fprintf(stderr, "error: failed to parse file descriptor argument %s\n", idmap_str);
+ return -1;
+ }
+
+ if (!verify_file_readable(target_apk_path)) {
+ ALOGD("error: failed to read apk %s: %s\n", target_apk_path, strerror(errno));
+ return -1;
+ }
+
+ if (!verify_file_readable(overlay_apk_path)) {
+ ALOGD("error: failed to read apk %s: %s\n", overlay_apk_path, strerror(errno));
+ return -1;
+ }
+
+ return idmap_create_fd(target_apk_path, overlay_apk_path, idmap_fd);
+ }
+
+ int maybe_create_path(const char *target_apk_path, const char *overlay_apk_path,
+ const char *idmap_path)
+ {
+ if (!verify_root_or_system()) {
+ fprintf(stderr, "error: permission denied: not user root or user system\n");
+ return -1;
+ }
+
+ if (!verify_file_readable(target_apk_path)) {
+ ALOGD("error: failed to read apk %s: %s\n", target_apk_path, strerror(errno));
+ return -1;
+ }
+
+ if (!verify_file_readable(overlay_apk_path)) {
+ ALOGD("error: failed to read apk %s: %s\n", overlay_apk_path, strerror(errno));
+ return -1;
+ }
+
+ return idmap_create_path(target_apk_path, overlay_apk_path, idmap_path);
+ }
+
+ int maybe_scan(const char *overlay_dir, const char *target_package_name,
+ const char *target_apk_path, const char *idmap_dir)
+ {
+ if (!verify_root_or_system()) {
+ fprintf(stderr, "error: permission denied: not user root or user system\n");
+ return -1;
+ }
+
+ if (!verify_directory_readable(overlay_dir)) {
+ ALOGD("error: no read access to %s: %s\n", overlay_dir, strerror(errno));
+ return -1;
+ }
+
+ if (!verify_file_readable(target_apk_path)) {
+ ALOGD("error: failed to read apk %s: %s\n", target_apk_path, strerror(errno));
+ return -1;
+ }
+
+ if (!verify_directory_writable(idmap_dir)) {
+ ALOGD("error: no write access to %s: %s\n", idmap_dir, strerror(errno));
+ return -1;
+ }
+
+ return idmap_scan(overlay_dir, target_package_name, target_apk_path, idmap_dir);
+ }
+
+ int maybe_inspect(const char *idmap_path)
+ {
+ // anyone (not just root or system) may do --inspect
+ if (!verify_file_readable(idmap_path)) {
+ ALOGD("error: failed to read idmap %s: %s\n", idmap_path, strerror(errno));
+ return -1;
+ }
+ return idmap_inspect(idmap_path);
+ }
+}
+
+int main(int argc, char **argv)
+{
+#if 0
+ {
+ char buf[1024];
+ buf[0] = '\0';
+ for (int i = 0; i < argc; ++i) {
+ strncat(buf, argv[i], sizeof(buf) - 1);
+ strncat(buf, " ", sizeof(buf) - 1);
+ }
+ ALOGD("%s:%d: uid=%d gid=%d argv=%s\n", __FILE__, __LINE__, getuid(), getgid(), buf);
+ }
+#endif
+
+ if (argc == 2 && !strcmp(argv[1], "--help")) {
+ printf("%s\n", usage);
+ return 0;
+ }
+
+ if (argc == 5 && !strcmp(argv[1], "--fd")) {
+ return maybe_create_fd(argv[2], argv[3], argv[4]);
+ }
+
+ if (argc == 5 && !strcmp(argv[1], "--path")) {
+ return maybe_create_path(argv[2], argv[3], argv[4]);
+ }
+
+ if (argc == 6 && !strcmp(argv[1], "--scan")) {
+ return maybe_scan(argv[2], argv[3], argv[4], argv[5]);
+ }
+
+ if (argc == 3 && !strcmp(argv[1], "--inspect")) {
+ return maybe_inspect(argv[2]);
+ }
+
+ fprintf(stderr, "Usage: don't use this (cf dexopt usage).\n");
+ return EXIT_FAILURE;
+}
diff --git a/cmds/idmap/idmap.h b/cmds/idmap/idmap.h
new file mode 100644
index 0000000..f507dd8
--- /dev/null
+++ b/cmds/idmap/idmap.h
@@ -0,0 +1,34 @@
+#ifndef _IDMAP_H_
+#define _IDMAP_H_
+
+#define LOG_TAG "idmap"
+
+#include <utils/Log.h>
+
+#include <errno.h>
+#include <stdio.h>
+
+#ifndef TEMP_FAILURE_RETRY
+// Used to retry syscalls that can return EINTR.
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+#endif
+
+int idmap_create_path(const char *target_apk_path, const char *overlay_apk_path,
+ const char *idmap_path);
+
+int idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd);
+
+// Regarding target_package_name: the idmap_scan implementation should
+// be able to extract this from the manifest in target_apk_path,
+// simplifying the external API.
+int idmap_scan(const char *overlay_dir, const char *target_package_name,
+ const char *target_apk_path, const char *idmap_dir);
+
+int idmap_inspect(const char *idmap_path);
+
+#endif // _IDMAP_H_
diff --git a/cmds/idmap/inspect.cpp b/cmds/idmap/inspect.cpp
new file mode 100644
index 0000000..a59f5d3
--- /dev/null
+++ b/cmds/idmap/inspect.cpp
@@ -0,0 +1,291 @@
+#include "idmap.h"
+
+#include <androidfw/AssetManager.h>
+#include <androidfw/ResourceTypes.h>
+#include <utils/String8.h>
+
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+
+using namespace android;
+
+#define NEXT(b, i, o) do { if (buf.next(&i, &o) < 0) { return -1; } } while (0)
+
+namespace {
+ static const uint32_t IDMAP_MAGIC = 0x706d6469;
+ static const size_t PATH_LENGTH = 256;
+ static const uint32_t IDMAP_HEADER_SIZE = (3 + 2 * (PATH_LENGTH / sizeof(uint32_t)));
+
+ void printe(const char *fmt, ...);
+
+ class IdmapBuffer {
+ private:
+ char *buf_;
+ size_t len_;
+ mutable size_t pos_;
+ public:
+ IdmapBuffer() : buf_((char *)MAP_FAILED), len_(0), pos_(0) {}
+
+ ~IdmapBuffer() {
+ if (buf_ != MAP_FAILED) {
+ munmap(buf_, len_);
+ }
+ }
+
+ int init(const char *idmap_path)
+ {
+ struct stat st;
+ int fd;
+
+ if (stat(idmap_path, &st) < 0) {
+ printe("failed to stat idmap '%s': %s\n", idmap_path, strerror(errno));
+ return -1;
+ }
+ len_ = st.st_size;
+ if ((fd = TEMP_FAILURE_RETRY(open(idmap_path, O_RDONLY))) < 0) {
+ printe("failed to open idmap '%s': %s\n", idmap_path, strerror(errno));
+ return -1;
+ }
+ if ((buf_ = (char*)mmap(NULL, len_, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+ close(fd);
+ printe("failed to mmap idmap: %s\n", strerror(errno));
+ return -1;
+ }
+ close(fd);
+ return 0;
+ }
+
+ int next(uint32_t *i, uint32_t *offset) const
+ {
+ if (!buf_) {
+ printe("failed to read next uint32_t: buffer not initialized\n");
+ return -1;
+ }
+ if (pos_ + 4 > len_) {
+ printe("failed to read next uint32_t: end of buffer reached at pos=0x%08x\n",
+ pos_);
+ return -1;
+ }
+ *offset = pos_ / sizeof(uint32_t);
+ char a = buf_[pos_++];
+ char b = buf_[pos_++];
+ char c = buf_[pos_++];
+ char d = buf_[pos_++];
+ *i = (d << 24) | (c << 16) | (b << 8) | a;
+ return 0;
+ }
+
+ int nextPath(char *b, uint32_t *offset_start, uint32_t *offset_end) const
+ {
+ if (!buf_) {
+ printe("failed to read next path: buffer not initialized\n");
+ return -1;
+ }
+ if (pos_ + PATH_LENGTH > len_) {
+ printe("failed to read next path: end of buffer reached at pos=0x%08x\n", pos_);
+ return -1;
+ }
+ memcpy(b, buf_ + pos_, PATH_LENGTH);
+ *offset_start = pos_ / sizeof(uint32_t);
+ pos_ += PATH_LENGTH;
+ *offset_end = pos_ / sizeof(uint32_t) - 1;
+ return 0;
+ }
+ };
+
+ void printe(const char *fmt, ...)
+ {
+ va_list ap;
+
+ va_start(ap, fmt);
+ fprintf(stderr, "error: ");
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
+
+ void print_header()
+ {
+ printf("SECTION ENTRY VALUE OFFSET COMMENT\n");
+ }
+
+ void print(const char *section, const char *subsection, uint32_t value, uint32_t offset,
+ const char *fmt, ...)
+ {
+ va_list ap;
+
+ va_start(ap, fmt);
+ printf("%-12s %-12s 0x%08x 0x%-4x ", section, subsection, value, offset);
+ vprintf(fmt, ap);
+ printf("\n");
+ va_end(ap);
+ }
+
+ void print_path(const char *section, const char *subsection, uint32_t offset_start,
+ uint32_t offset_end, const char *fmt, ...)
+ {
+ va_list ap;
+
+ va_start(ap, fmt);
+ printf("%-12s %-12s .......... 0x%02x-0x%02x ", section, subsection, offset_start,
+ offset_end);
+ vprintf(fmt, ap);
+ printf("\n");
+ va_end(ap);
+ }
+
+ int resource_metadata(const AssetManager& am, uint32_t res_id,
+ String8 *package, String8 *type, String8 *name)
+ {
+ const ResTable& rt = am.getResources();
+ struct ResTable::resource_name data;
+ if (!rt.getResourceName(res_id, false, &data)) {
+ printe("failed to get resource name id=0x%08x\n", res_id);
+ return -1;
+ }
+ if (package) {
+ *package = String8(String16(data.package, data.packageLen));
+ }
+ if (type) {
+ *type = String8(String16(data.type, data.typeLen));
+ }
+ if (name) {
+ *name = String8(String16(data.name, data.nameLen));
+ }
+ return 0;
+ }
+
+ int package_id(const AssetManager& am)
+ {
+ return (am.getResources().getBasePackageId(0)) << 24;
+ }
+
+ int parse_idmap_header(const IdmapBuffer& buf, AssetManager& am)
+ {
+ uint32_t i, o, e;
+ char path[PATH_LENGTH];
+
+ NEXT(buf, i, o);
+ if (i != IDMAP_MAGIC) {
+ printe("not an idmap file: actual magic constant 0x%08x does not match expected magic "
+ "constant 0x%08x\n", i, IDMAP_MAGIC);
+ return -1;
+ }
+ print_header();
+ print("IDMAP HEADER", "magic", i, o, "");
+
+ NEXT(buf, i, o);
+ print("", "base crc", i, o, "");
+
+ NEXT(buf, i, o);
+ print("", "overlay crc", i, o, "");
+
+ if (buf.nextPath(path, &o, &e) < 0) {
+ // printe done from IdmapBuffer::nextPath
+ return -1;
+ }
+ print_path("", "base path", o, e, "%s", path);
+ if (!am.addAssetPath(String8(path), NULL)) {
+ printe("failed to add '%s' as asset path\n", path);
+ return -1;
+ }
+
+ if (buf.nextPath(path, &o, &e) < 0) {
+ // printe done from IdmapBuffer::nextPath
+ return -1;
+ }
+ print_path("", "overlay path", o, e, "%s", path);
+
+ return 0;
+ }
+
+ int parse_data_header(const IdmapBuffer& buf, const AssetManager& am, Vector<uint32_t>& types)
+ {
+ uint32_t i, o;
+ const uint32_t numeric_package = package_id(am);
+
+ NEXT(buf, i, o);
+ print("DATA HEADER", "types count", i, o, "");
+ const uint32_t N = i;
+
+ for (uint32_t j = 0; j < N; ++j) {
+ NEXT(buf, i, o);
+ if (i == 0) {
+ print("", "padding", i, o, "");
+ } else {
+ String8 type;
+ const uint32_t numeric_type = (j + 1) << 16;
+ const uint32_t res_id = numeric_package | numeric_type;
+ if (resource_metadata(am, res_id, NULL, &type, NULL) < 0) {
+ // printe done from resource_metadata
+ return -1;
+ }
+ print("", "type offset", i, o, "absolute offset 0x%02x, %s",
+ i + IDMAP_HEADER_SIZE, type.string());
+ types.add(numeric_type);
+ }
+ }
+
+ return 0;
+ }
+
+ int parse_data_block(const IdmapBuffer& buf, const AssetManager& am, size_t numeric_type)
+ {
+ uint32_t i, o, n, id_offset;
+ const uint32_t numeric_package = package_id(am);
+
+ NEXT(buf, i, o);
+ print("DATA BLOCK", "entry count", i, o, "");
+ n = i;
+
+ NEXT(buf, i, o);
+ print("", "entry offset", i, o, "");
+ id_offset = i;
+
+ for ( ; n > 0; --n) {
+ String8 type, name;
+
+ NEXT(buf, i, o);
+ if (i == 0) {
+ print("", "padding", i, o, "");
+ } else {
+ uint32_t res_id = numeric_package | numeric_type | id_offset;
+ if (resource_metadata(am, res_id, NULL, &type, &name) < 0) {
+ // printe done from resource_metadata
+ return -1;
+ }
+ print("", "entry", i, o, "%s/%s", type.string(), name.string());
+ }
+ ++id_offset;
+ }
+
+ return 0;
+ }
+}
+
+int idmap_inspect(const char *idmap_path)
+{
+ IdmapBuffer buf;
+ if (buf.init(idmap_path) < 0) {
+ // printe done from IdmapBuffer::init
+ return EXIT_FAILURE;
+ }
+ AssetManager am;
+ if (parse_idmap_header(buf, am) < 0) {
+ // printe done from parse_idmap_header
+ return EXIT_FAILURE;
+ }
+ Vector<uint32_t> types;
+ if (parse_data_header(buf, am, types) < 0) {
+ // printe done from parse_data_header
+ return EXIT_FAILURE;
+ }
+ const size_t N = types.size();
+ for (size_t i = 0; i < N; ++i) {
+ if (parse_data_block(buf, am, types.itemAt(i)) < 0) {
+ // printe done from parse_data_block
+ return EXIT_FAILURE;
+ }
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/cmds/idmap/scan.cpp b/cmds/idmap/scan.cpp
new file mode 100644
index 0000000..c5fc941
--- /dev/null
+++ b/cmds/idmap/scan.cpp
@@ -0,0 +1,244 @@
+#include "idmap.h"
+
+#include <UniquePtr.h>
+#include <androidfw/ResourceTypes.h>
+#include <androidfw/StreamingZipInflater.h>
+#include <androidfw/ZipFileRO.h>
+#include <private/android_filesystem_config.h> // for AID_SYSTEM
+#include <utils/SortedVector.h>
+#include <utils/String16.h>
+#include <utils/String8.h>
+
+#include <dirent.h>
+
+#define NO_OVERLAY_TAG (-1000)
+
+using namespace android;
+
+namespace {
+ struct Overlay {
+ Overlay() {}
+ Overlay(const String8& a, const String8& i, int p) :
+ apk_path(a), idmap_path(i), priority(p) {}
+
+ bool operator<(Overlay const& rhs) const
+ {
+ // Note: order is reversed by design
+ return rhs.priority < priority;
+ }
+
+ String8 apk_path;
+ String8 idmap_path;
+ int priority;
+ };
+
+ bool writePackagesList(const char *filename, const SortedVector<Overlay>& overlayVector)
+ {
+ FILE* fout = fopen(filename, "w");
+ if (fout == NULL) {
+ return false;
+ }
+
+ for (size_t i = 0; i < overlayVector.size(); ++i) {
+ const Overlay& overlay = overlayVector[i];
+ fprintf(fout, "%s %s\n", overlay.apk_path.string(), overlay.idmap_path.string());
+ }
+
+ fclose(fout);
+
+ // Make file world readable since Zygote (running as root) will read
+ // it when creating the initial AssetManger object
+ const mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; // 0644
+ if (chmod(filename, mode) == -1) {
+ unlink(filename);
+ return false;
+ }
+
+ return true;
+ }
+
+ String8 flatten_path(const char *path)
+ {
+ String16 tmp(path);
+ tmp.replaceAll('/', '@');
+ return String8(tmp);
+ }
+
+ int mkdir_p(const String8& path, uid_t uid, gid_t gid)
+ {
+ static const mode_t mode =
+ S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH;
+ struct stat st;
+
+ if (stat(path.string(), &st) == 0) {
+ return 0;
+ }
+ if (mkdir_p(path.getPathDir(), uid, gid) < 0) {
+ return -1;
+ }
+ if (mkdir(path.string(), 0755) != 0) {
+ return -1;
+ }
+ if (chown(path.string(), uid, gid) == -1) {
+ return -1;
+ }
+ if (chmod(path.string(), mode) == -1) {
+ return -1;
+ }
+ return 0;
+ }
+
+ int parse_overlay_tag(const ResXMLTree& parser, const char *target_package_name)
+ {
+ const size_t N = parser.getAttributeCount();
+ String16 target;
+ int priority = -1;
+ for (size_t i = 0; i < N; ++i) {
+ size_t len;
+ String16 key(parser.getAttributeName(i, &len));
+ if (key == String16("targetPackage")) {
+ const uint16_t *p = parser.getAttributeStringValue(i, &len);
+ if (p) {
+ target = String16(p, len);
+ }
+ } else if (key == String16("priority")) {
+ Res_value v;
+ if (parser.getAttributeValue(i, &v) == sizeof(Res_value)) {
+ priority = v.data;
+ if (priority < 0 || priority > 9999) {
+ return -1;
+ }
+ }
+ }
+ }
+ if (target == String16(target_package_name)) {
+ return priority;
+ }
+ return NO_OVERLAY_TAG;
+ }
+
+ int parse_manifest(const void *data, size_t size, const char *target_package_name)
+ {
+ ResXMLTree parser(data, size);
+ if (parser.getError() != NO_ERROR) {
+ ALOGD("%s failed to init xml parser, error=0x%08x\n", __FUNCTION__, parser.getError());
+ return -1;
+ }
+
+ ResXMLParser::event_code_t type;
+ do {
+ type = parser.next();
+ if (type == ResXMLParser::START_TAG) {
+ size_t len;
+ String16 tag(parser.getElementName(&len));
+ if (tag == String16("overlay")) {
+ return parse_overlay_tag(parser, target_package_name);
+ }
+ }
+ } while (type != ResXMLParser::BAD_DOCUMENT && type != ResXMLParser::END_DOCUMENT);
+
+ return NO_OVERLAY_TAG;
+ }
+
+ int parse_apk(const char *path, const char *target_package_name)
+ {
+ UniquePtr<ZipFileRO> zip(ZipFileRO::open(path));
+ if (zip.get() == NULL) {
+ ALOGW("%s: failed to open zip %s\n", __FUNCTION__, path);
+ return -1;
+ }
+ ZipEntryRO entry;
+ if ((entry = zip->findEntryByName("AndroidManifest.xml")) == NULL) {
+ ALOGW("%s: failed to find entry AndroidManifest.xml\n", __FUNCTION__);
+ return -1;
+ }
+ size_t uncompLen = 0;
+ int method;
+ if (!zip->getEntryInfo(entry, &method, &uncompLen, NULL, NULL, NULL, NULL)) {
+ ALOGW("%s: failed to read entry info\n", __FUNCTION__);
+ return -1;
+ }
+ if (method != ZipFileRO::kCompressDeflated) {
+ ALOGW("%s: cannot handle zip compression method %d\n", __FUNCTION__, method);
+ return -1;
+ }
+ FileMap *dataMap = zip->createEntryFileMap(entry);
+ if (!dataMap) {
+ ALOGW("%s: failed to create FileMap\n", __FUNCTION__);
+ return -1;
+ }
+ char *buf = new char[uncompLen];
+ if (NULL == buf) {
+ ALOGW("%s: failed to allocate %d byte\n", __FUNCTION__, uncompLen);
+ dataMap->release();
+ return -1;
+ }
+ StreamingZipInflater inflater(dataMap, uncompLen);
+ if (inflater.read(buf, uncompLen) < 0) {
+ ALOGW("%s: failed to inflate %d byte\n", __FUNCTION__, uncompLen);
+ delete[] buf;
+ dataMap->release();
+ return -1;
+ }
+
+ int priority = parse_manifest(buf, uncompLen, target_package_name);
+ delete[] buf;
+ dataMap->release();
+ return priority;
+ }
+}
+
+int idmap_scan(const char *overlay_dir, const char *target_package_name,
+ const char *target_apk_path, const char *idmap_dir)
+{
+ String8 filename = String8(idmap_dir);
+ filename.appendPath("overlays.list");
+ if (unlink(filename.string()) != 0 && errno != ENOENT) {
+ return EXIT_FAILURE;
+ }
+
+ DIR *dir = opendir(overlay_dir);
+ if (dir == NULL) {
+ return EXIT_FAILURE;
+ }
+
+ SortedVector<Overlay> overlayVector;
+ struct dirent *dirent;
+ while ((dirent = readdir(dir)) != NULL) {
+ struct stat st;
+ char overlay_apk_path[PATH_MAX + 1];
+ snprintf(overlay_apk_path, PATH_MAX, "%s/%s", overlay_dir, dirent->d_name);
+ if (stat(overlay_apk_path, &st) < 0) {
+ continue;
+ }
+ if (!S_ISREG(st.st_mode)) {
+ continue;
+ }
+
+ int priority = parse_apk(overlay_apk_path, target_package_name);
+ if (priority < 0) {
+ continue;
+ }
+
+ String8 idmap_path(idmap_dir);
+ idmap_path.appendPath(flatten_path(overlay_apk_path + 1));
+ idmap_path.append("@idmap");
+
+ if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) {
+ ALOGE("error: failed to create idmap for target=%s overlay=%s idmap=%s\n",
+ target_apk_path, overlay_apk_path, idmap_path.string());
+ continue;
+ }
+
+ Overlay overlay(String8(overlay_apk_path), idmap_path, priority);
+ overlayVector.add(overlay);
+ }
+
+ closedir(dir);
+
+ if (!writePackagesList(filename.string(), overlayVector)) {
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index e9d6b15..e4f63e2 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -618,14 +618,11 @@
ALOGE("execl(%s) failed: %s\n", DEX2OAT_BIN, strerror(errno));
}
-static int wait_dexopt(pid_t pid, const char* apk_path)
+static int wait_child(pid_t pid)
{
int status;
pid_t got_pid;
- /*
- * Wait for the optimization process to finish.
- */
while (1) {
got_pid = waitpid(pid, &status, 0);
if (got_pid == -1 && errno == EINTR) {
@@ -641,11 +638,8 @@
}
if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
- ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
return 0;
} else {
- ALOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
- apk_path, status);
return status; /* always nonzero */
}
}
@@ -669,7 +663,7 @@
ALOGV("dalvik.vm.dexopt_flags=%s\n", dexopt_flags);
/* The command to run depend ones the value of persist.sys.dalvik.vm.lib */
- property_get("persist.sys.dalvik.vm.lib", persist_sys_dalvik_vm_lib, "libdvm.so");
+ property_get("persist.sys.dalvik.vm.lib.1", persist_sys_dalvik_vm_lib, "libdvm.so");
/* Before anything else: is there a .odex file? If so, we have
* precompiled the apk and there is nothing to do here.
@@ -747,9 +741,11 @@
}
exit(68); /* only get here on exec failure */
} else {
- res = wait_dexopt(pid, apk_path);
- if (res != 0) {
- ALOGE("dexopt in='%s' out='%s' res=%d\n", apk_path, out_path, res);
+ res = wait_child(pid);
+ if (res == 0) {
+ ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
+ } else {
+ ALOGE("DexInv: --- END '%s' --- status=0x%04x, process failed\n", apk_path, res);
goto fail;
}
}
@@ -1103,3 +1099,115 @@
return rc;
}
+
+static void run_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd)
+{
+ static const char *IDMAP_BIN = "/system/bin/idmap";
+ static const size_t MAX_INT_LEN = 32;
+ char idmap_str[MAX_INT_LEN];
+
+ snprintf(idmap_str, sizeof(idmap_str), "%d", idmap_fd);
+
+ execl(IDMAP_BIN, IDMAP_BIN, "--fd", target_apk, overlay_apk, idmap_str, (char*)NULL);
+ ALOGE("execl(%s) failed: %s\n", IDMAP_BIN, strerror(errno));
+}
+
+// Transform string /a/b/c.apk to (prefix)/a@b@c.apk@(suffix)
+// eg /a/b/c.apk to /data/resource-cache/a@b@c.apk@idmap
+static int flatten_path(const char *prefix, const char *suffix,
+ const char *overlay_path, char *idmap_path, size_t N)
+{
+ if (overlay_path == NULL || idmap_path == NULL) {
+ return -1;
+ }
+ const size_t len_overlay_path = strlen(overlay_path);
+ // will access overlay_path + 1 further below; requires absolute path
+ if (len_overlay_path < 2 || *overlay_path != '/') {
+ return -1;
+ }
+ const size_t len_idmap_root = strlen(prefix);
+ const size_t len_suffix = strlen(suffix);
+ if (SIZE_MAX - len_idmap_root < len_overlay_path ||
+ SIZE_MAX - (len_idmap_root + len_overlay_path) < len_suffix) {
+ // additions below would cause overflow
+ return -1;
+ }
+ if (N < len_idmap_root + len_overlay_path + len_suffix) {
+ return -1;
+ }
+ memset(idmap_path, 0, N);
+ snprintf(idmap_path, N, "%s%s%s", prefix, overlay_path + 1, suffix);
+ char *ch = idmap_path + len_idmap_root;
+ while (*ch != '\0') {
+ if (*ch == '/') {
+ *ch = '@';
+ }
+ ++ch;
+ }
+ return 0;
+}
+
+int idmap(const char *target_apk, const char *overlay_apk, uid_t uid)
+{
+ ALOGV("idmap target_apk=%s overlay_apk=%s uid=%d\n", target_apk, overlay_apk, uid);
+
+ int idmap_fd = -1;
+ char idmap_path[PATH_MAX];
+
+ if (flatten_path(IDMAP_PREFIX, IDMAP_SUFFIX, overlay_apk,
+ idmap_path, sizeof(idmap_path)) == -1) {
+ ALOGE("idmap cannot generate idmap path for overlay %s\n", overlay_apk);
+ goto fail;
+ }
+
+ unlink(idmap_path);
+ idmap_fd = open(idmap_path, O_RDWR | O_CREAT | O_EXCL, 0644);
+ if (idmap_fd < 0) {
+ ALOGE("idmap cannot open '%s' for output: %s\n", idmap_path, strerror(errno));
+ goto fail;
+ }
+ if (fchown(idmap_fd, AID_SYSTEM, uid) < 0) {
+ ALOGE("idmap cannot chown '%s'\n", idmap_path);
+ goto fail;
+ }
+ if (fchmod(idmap_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) {
+ ALOGE("idmap cannot chmod '%s'\n", idmap_path);
+ goto fail;
+ }
+
+ pid_t pid;
+ pid = fork();
+ if (pid == 0) {
+ /* child -- drop privileges before continuing */
+ if (setgid(uid) != 0) {
+ ALOGE("setgid(%d) failed during idmap\n", uid);
+ exit(1);
+ }
+ if (setuid(uid) != 0) {
+ ALOGE("setuid(%d) failed during idmap\n", uid);
+ exit(1);
+ }
+ if (flock(idmap_fd, LOCK_EX | LOCK_NB) != 0) {
+ ALOGE("flock(%s) failed during idmap: %s\n", idmap_path, strerror(errno));
+ exit(1);
+ }
+
+ run_idmap(target_apk, overlay_apk, idmap_fd);
+ exit(1); /* only if exec call to idmap failed */
+ } else {
+ int status = wait_child(pid);
+ if (status != 0) {
+ ALOGE("idmap failed, status=0x%04x\n", status);
+ goto fail;
+ }
+ }
+
+ close(idmap_fd);
+ return 0;
+fail:
+ if (idmap_fd >= 0) {
+ close(idmap_fd);
+ unlink(idmap_path);
+ }
+ return -1;
+}
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index 0c80dac..9c66f2d 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -124,6 +124,11 @@
return linklib(arg[0], arg[1], atoi(arg[2]));
}
+static int do_idmap(char **arg, char reply[REPLY_MAX])
+{
+ return idmap(arg[0], arg[1], atoi(arg[2]));
+}
+
struct cmdinfo {
const char *name;
unsigned numargs;
@@ -147,6 +152,7 @@
{ "linklib", 3, do_linklib },
{ "mkuserdata", 4, do_mk_user_data },
{ "rmuser", 1, do_rm_user },
+ { "idmap", 3, do_idmap },
};
static int readx(int s, void *_buf, int count)
@@ -515,6 +521,7 @@
capdata[CAP_TO_INDEX(CAP_CHOWN)].permitted |= CAP_TO_MASK(CAP_CHOWN);
capdata[CAP_TO_INDEX(CAP_SETUID)].permitted |= CAP_TO_MASK(CAP_SETUID);
capdata[CAP_TO_INDEX(CAP_SETGID)].permitted |= CAP_TO_MASK(CAP_SETGID);
+ capdata[CAP_TO_INDEX(CAP_FOWNER)].permitted |= CAP_TO_MASK(CAP_FOWNER);
capdata[0].effective = capdata[0].permitted;
capdata[1].effective = capdata[1].permitted;
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 9ca2f86..cab5cb7 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -75,6 +75,9 @@
#define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/"
+#define IDMAP_PREFIX "/data/resource-cache/"
+#define IDMAP_SUFFIX "@idmap"
+
#define PKG_NAME_MAX 128 /* largest allowed package name */
#define PKG_PATH_MAX 256 /* max size of any path we use */
@@ -207,3 +210,4 @@
int dexopt(const char *apk_path, uid_t uid, int is_public);
int movefiles();
int linklib(const char* target, const char* source, int userId);
+int idmap(const char *target_path, const char *overlay_path, uid_t uid);
diff --git a/cmds/servicemanager/Android.mk b/cmds/servicemanager/Android.mk
index 8840867..4ab8df6 100644
--- a/cmds/servicemanager/Android.mk
+++ b/cmds/servicemanager/Android.mk
@@ -1,12 +1,25 @@
LOCAL_PATH:= $(call my-dir)
-#include $(CLEAR_VARS)
-#LOCAL_SRC_FILES := bctest.c binder.c
-#LOCAL_MODULE := bctest
-#include $(BUILD_EXECUTABLE)
+svc_c_flags = \
+ -Wall -Wextra \
+
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+svc_c_flags += -DBINDER_IPC_32BIT=1
+endif
+endif
+
+include $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := liblog
+LOCAL_SRC_FILES := bctest.c binder.c
+LOCAL_CFLAGS += $(svc_c_flags)
+LOCAL_MODULE := bctest
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_SRC_FILES := service_manager.c binder.c
+LOCAL_CFLAGS += $(svc_c_flags)
LOCAL_MODULE := servicemanager
include $(BUILD_EXECUTABLE)
diff --git a/cmds/servicemanager/bctest.c b/cmds/servicemanager/bctest.c
index ff5aced..e02b45d 100644
--- a/cmds/servicemanager/bctest.c
+++ b/cmds/servicemanager/bctest.c
@@ -7,9 +7,9 @@
#include "binder.h"
-void *svcmgr_lookup(struct binder_state *bs, void *target, const char *name)
+uint32_t svcmgr_lookup(struct binder_state *bs, uint32_t target, const char *name)
{
- void *ptr;
+ uint32_t handle;
unsigned iodata[512/4];
struct binder_io msg, reply;
@@ -21,19 +21,19 @@
if (binder_call(bs, &msg, &reply, target, SVC_MGR_CHECK_SERVICE))
return 0;
- ptr = bio_get_ref(&reply);
+ handle = bio_get_ref(&reply);
- if (ptr)
- binder_acquire(bs, ptr);
+ if (handle)
+ binder_acquire(bs, handle);
binder_done(bs, &msg, &reply);
- return ptr;
+ return handle;
}
-int svcmgr_publish(struct binder_state *bs, void *target, const char *name, void *ptr)
+int svcmgr_publish(struct binder_state *bs, uint32_t target, const char *name, void *ptr)
{
- unsigned status;
+ int status;
unsigned iodata[512/4];
struct binder_io msg, reply;
@@ -59,29 +59,33 @@
{
int fd;
struct binder_state *bs;
- void *svcmgr = BINDER_SERVICE_MANAGER;
+ uint32_t svcmgr = BINDER_SERVICE_MANAGER;
+ uint32_t handle;
bs = binder_open(128*1024);
+ if (!bs) {
+ fprintf(stderr, "failed to open binder driver\n");
+ return -1;
+ }
argc--;
argv++;
while (argc > 0) {
if (!strcmp(argv[0],"alt")) {
- void *ptr = svcmgr_lookup(bs, svcmgr, "alt_svc_mgr");
- if (!ptr) {
+ handle = svcmgr_lookup(bs, svcmgr, "alt_svc_mgr");
+ if (!handle) {
fprintf(stderr,"cannot find alt_svc_mgr\n");
return -1;
}
- svcmgr = ptr;
- fprintf(stderr,"svcmgr is via %p\n", ptr);
+ svcmgr = handle;
+ fprintf(stderr,"svcmgr is via %x\n", handle);
} else if (!strcmp(argv[0],"lookup")) {
- void *ptr;
if (argc < 2) {
fprintf(stderr,"argument required\n");
return -1;
}
- ptr = svcmgr_lookup(bs, svcmgr, argv[1]);
- fprintf(stderr,"lookup(%s) = %p\n", argv[1], ptr);
+ handle = svcmgr_lookup(bs, svcmgr, argv[1]);
+ fprintf(stderr,"lookup(%s) = %x\n", argv[1], handle);
argc--;
argv++;
} else if (!strcmp(argv[0],"publish")) {
diff --git a/cmds/servicemanager/binder.c b/cmds/servicemanager/binder.c
index 1985756..db7632d 100644
--- a/cmds/servicemanager/binder.c
+++ b/cmds/servicemanager/binder.c
@@ -1,6 +1,7 @@
/* Copyright 2008 The Android Open Source Project
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -17,17 +18,17 @@
#define LOG_TAG "Binder"
#include <cutils/log.h>
-void bio_init_from_txn(struct binder_io *io, struct binder_txn *txn);
+void bio_init_from_txn(struct binder_io *io, struct binder_transaction_data *txn);
#if TRACE
-void hexdump(void *_data, unsigned len)
+void hexdump(void *_data, size_t len)
{
unsigned char *data = _data;
- unsigned count;
+ size_t count;
for (count = 0; count < len; count++) {
if ((count & 15) == 0)
- fprintf(stderr,"%04x:", count);
+ fprintf(stderr,"%04zu:", count);
fprintf(stderr," %02x %c", *data,
(*data < 32) || (*data > 126) ? '.' : *data);
data++;
@@ -38,21 +39,21 @@
fprintf(stderr,"\n");
}
-void binder_dump_txn(struct binder_txn *txn)
+void binder_dump_txn(struct binder_transaction_data *txn)
{
- struct binder_object *obj;
- unsigned *offs = txn->offs;
- unsigned count = txn->offs_size / 4;
+ struct flat_binder_object *obj;
+ binder_size_t *offs = (binder_size_t *)(uintptr_t)txn->data.ptr.offsets;
+ size_t count = txn->offsets_size / sizeof(binder_size_t);
- fprintf(stderr," target %p cookie %p code %08x flags %08x\n",
- txn->target, txn->cookie, txn->code, txn->flags);
- fprintf(stderr," pid %8d uid %8d data %8d offs %8d\n",
- txn->sender_pid, txn->sender_euid, txn->data_size, txn->offs_size);
- hexdump(txn->data, txn->data_size);
+ fprintf(stderr," target %016"PRIx64" cookie %016"PRIx64" code %08x flags %08x\n",
+ (uint64_t)txn->target.ptr, (uint64_t)txn->cookie, txn->code, txn->flags);
+ fprintf(stderr," pid %8d uid %8d data %"PRIu64" offs %"PRIu64"\n",
+ txn->sender_pid, txn->sender_euid, (uint64_t)txn->data_size, (uint64_t)txn->offsets_size);
+ hexdump((void *)(uintptr_t)txn->data.ptr.buffer, txn->data_size);
while (count--) {
- obj = (void*) (((char*) txn->data) + *offs++);
- fprintf(stderr," - type %08x flags %08x ptr %p cookie %p\n",
- obj->type, obj->flags, obj->pointer, obj->cookie);
+ obj = (struct flat_binder_object *) (((char*)(uintptr_t)txn->data.ptr.buffer) + *offs++);
+ fprintf(stderr," - type %08x flags %08x ptr %016"PRIx64" cookie %016"PRIx64"\n",
+ obj->type, obj->flags, (uint64_t)obj->binder, (uint64_t)obj->cookie);
}
}
@@ -88,17 +89,18 @@
{
int fd;
void *mapped;
- unsigned mapsize;
+ size_t mapsize;
};
-struct binder_state *binder_open(unsigned mapsize)
+struct binder_state *binder_open(size_t mapsize)
{
struct binder_state *bs;
+ struct binder_version vers;
bs = malloc(sizeof(*bs));
if (!bs) {
errno = ENOMEM;
- return 0;
+ return NULL;
}
bs->fd = open("/dev/binder", O_RDWR);
@@ -108,6 +110,12 @@
goto fail_open;
}
+ if ((ioctl(bs->fd, BINDER_VERSION, &vers) == -1) ||
+ (vers.protocol_version != BINDER_CURRENT_PROTOCOL_VERSION)) {
+ fprintf(stderr, "binder: driver version differs from user space\n");
+ goto fail_open;
+ }
+
bs->mapsize = mapsize;
bs->mapped = mmap(NULL, mapsize, PROT_READ, MAP_PRIVATE, bs->fd, 0);
if (bs->mapped == MAP_FAILED) {
@@ -116,15 +124,13 @@
goto fail_map;
}
- /* TODO: check version */
-
return bs;
fail_map:
close(bs->fd);
fail_open:
free(bs);
- return 0;
+ return NULL;
}
void binder_close(struct binder_state *bs)
@@ -139,13 +145,14 @@
return ioctl(bs->fd, BINDER_SET_CONTEXT_MGR, 0);
}
-int binder_write(struct binder_state *bs, void *data, unsigned len)
+int binder_write(struct binder_state *bs, void *data, size_t len)
{
struct binder_write_read bwr;
int res;
+
bwr.write_size = len;
bwr.write_consumed = 0;
- bwr.write_buffer = (unsigned) data;
+ bwr.write_buffer = (uintptr_t) data;
bwr.read_size = 0;
bwr.read_consumed = 0;
bwr.read_buffer = 0;
@@ -159,46 +166,47 @@
void binder_send_reply(struct binder_state *bs,
struct binder_io *reply,
- void *buffer_to_free,
+ binder_uintptr_t buffer_to_free,
int status)
{
struct {
uint32_t cmd_free;
- void *buffer;
+ binder_uintptr_t buffer;
uint32_t cmd_reply;
- struct binder_txn txn;
+ struct binder_transaction_data txn;
} __attribute__((packed)) data;
data.cmd_free = BC_FREE_BUFFER;
data.buffer = buffer_to_free;
data.cmd_reply = BC_REPLY;
- data.txn.target = 0;
+ data.txn.target.ptr = 0;
data.txn.cookie = 0;
data.txn.code = 0;
if (status) {
data.txn.flags = TF_STATUS_CODE;
data.txn.data_size = sizeof(int);
- data.txn.offs_size = 0;
- data.txn.data = &status;
- data.txn.offs = 0;
+ data.txn.offsets_size = 0;
+ data.txn.data.ptr.buffer = (uintptr_t)&status;
+ data.txn.data.ptr.offsets = 0;
} else {
data.txn.flags = 0;
data.txn.data_size = reply->data - reply->data0;
- data.txn.offs_size = ((char*) reply->offs) - ((char*) reply->offs0);
- data.txn.data = reply->data0;
- data.txn.offs = reply->offs0;
+ data.txn.offsets_size = ((char*) reply->offs) - ((char*) reply->offs0);
+ data.txn.data.ptr.buffer = (uintptr_t)reply->data0;
+ data.txn.data.ptr.offsets = (uintptr_t)reply->offs0;
}
binder_write(bs, &data, sizeof(data));
}
int binder_parse(struct binder_state *bs, struct binder_io *bio,
- uint32_t *ptr, uint32_t size, binder_handler func)
+ uintptr_t ptr, size_t size, binder_handler func)
{
int r = 1;
- uint32_t *end = ptr + (size / 4);
+ uintptr_t end = ptr + (uintptr_t) size;
while (ptr < end) {
- uint32_t cmd = *ptr++;
+ uint32_t cmd = *(uint32_t *) ptr;
+ ptr += sizeof(uint32_t);
#if TRACE
fprintf(stderr,"%s:\n", cmd_name(cmd));
#endif
@@ -212,13 +220,13 @@
case BR_RELEASE:
case BR_DECREFS:
#if TRACE
- fprintf(stderr," %08x %08x\n", ptr[0], ptr[1]);
+ fprintf(stderr," %p, %p\n", (void *)ptr, (void *)(ptr + sizeof(void *)));
#endif
- ptr += 2;
+ ptr += sizeof(struct binder_ptr_cookie);
break;
case BR_TRANSACTION: {
- struct binder_txn *txn = (void *) ptr;
- if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
+ struct binder_transaction_data *txn = (struct binder_transaction_data *) ptr;
+ if ((end - ptr) < sizeof(*txn)) {
ALOGE("parse: txn too small!\n");
return -1;
}
@@ -232,14 +240,14 @@
bio_init(&reply, rdata, sizeof(rdata), 4);
bio_init_from_txn(&msg, txn);
res = func(bs, txn, &msg, &reply);
- binder_send_reply(bs, &reply, txn->data, res);
+ binder_send_reply(bs, &reply, txn->data.ptr.buffer, res);
}
- ptr += sizeof(*txn) / sizeof(uint32_t);
+ ptr += sizeof(*txn);
break;
}
case BR_REPLY: {
- struct binder_txn *txn = (void*) ptr;
- if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
+ struct binder_transaction_data *txn = (struct binder_transaction_data *) ptr;
+ if ((end - ptr) < sizeof(*txn)) {
ALOGE("parse: reply too small!\n");
return -1;
}
@@ -248,14 +256,15 @@
bio_init_from_txn(bio, txn);
bio = 0;
} else {
- /* todo FREE BUFFER */
+ /* todo FREE BUFFER */
}
- ptr += (sizeof(*txn) / sizeof(uint32_t));
+ ptr += sizeof(*txn);
r = 0;
break;
}
case BR_DEAD_BINDER: {
- struct binder_death *death = (void*) *ptr++;
+ struct binder_death *death = (struct binder_death *)(uintptr_t) *(binder_uintptr_t *)ptr;
+ ptr += sizeof(binder_uintptr_t);
death->func(bs, death->ptr);
break;
}
@@ -274,42 +283,45 @@
return r;
}
-void binder_acquire(struct binder_state *bs, void *ptr)
+void binder_acquire(struct binder_state *bs, uint32_t target)
{
uint32_t cmd[2];
cmd[0] = BC_ACQUIRE;
- cmd[1] = (uint32_t) ptr;
+ cmd[1] = target;
binder_write(bs, cmd, sizeof(cmd));
}
-void binder_release(struct binder_state *bs, void *ptr)
+void binder_release(struct binder_state *bs, uint32_t target)
{
uint32_t cmd[2];
cmd[0] = BC_RELEASE;
- cmd[1] = (uint32_t) ptr;
+ cmd[1] = target;
binder_write(bs, cmd, sizeof(cmd));
}
-void binder_link_to_death(struct binder_state *bs, void *ptr, struct binder_death *death)
+void binder_link_to_death(struct binder_state *bs, uint32_t target, struct binder_death *death)
{
- uint32_t cmd[3];
- cmd[0] = BC_REQUEST_DEATH_NOTIFICATION;
- cmd[1] = (uint32_t) ptr;
- cmd[2] = (uint32_t) death;
- binder_write(bs, cmd, sizeof(cmd));
-}
+ struct {
+ uint32_t cmd;
+ struct binder_handle_cookie payload;
+ } __attribute__((packed)) data;
+ data.cmd = BC_REQUEST_DEATH_NOTIFICATION;
+ data.payload.handle = target;
+ data.payload.cookie = (uintptr_t) death;
+ binder_write(bs, &data, sizeof(data));
+}
int binder_call(struct binder_state *bs,
struct binder_io *msg, struct binder_io *reply,
- void *target, uint32_t code)
+ uint32_t target, uint32_t code)
{
int res;
struct binder_write_read bwr;
struct {
uint32_t cmd;
- struct binder_txn txn;
- } writebuf;
+ struct binder_transaction_data txn;
+ } __attribute__((packed)) writebuf;
unsigned readbuf[32];
if (msg->flags & BIO_F_OVERFLOW) {
@@ -318,23 +330,23 @@
}
writebuf.cmd = BC_TRANSACTION;
- writebuf.txn.target = target;
+ writebuf.txn.target.handle = target;
writebuf.txn.code = code;
writebuf.txn.flags = 0;
writebuf.txn.data_size = msg->data - msg->data0;
- writebuf.txn.offs_size = ((char*) msg->offs) - ((char*) msg->offs0);
- writebuf.txn.data = msg->data0;
- writebuf.txn.offs = msg->offs0;
+ writebuf.txn.offsets_size = ((char*) msg->offs) - ((char*) msg->offs0);
+ writebuf.txn.data.ptr.buffer = (uintptr_t)msg->data0;
+ writebuf.txn.data.ptr.offsets = (uintptr_t)msg->offs0;
bwr.write_size = sizeof(writebuf);
bwr.write_consumed = 0;
- bwr.write_buffer = (unsigned) &writebuf;
-
+ bwr.write_buffer = (uintptr_t) &writebuf;
+
hexdump(msg->data0, msg->data - msg->data0);
for (;;) {
bwr.read_size = sizeof(readbuf);
bwr.read_consumed = 0;
- bwr.read_buffer = (unsigned) readbuf;
+ bwr.read_buffer = (uintptr_t) readbuf;
res = ioctl(bs->fd, BINDER_WRITE_READ, &bwr);
@@ -343,7 +355,7 @@
goto fail;
}
- res = binder_parse(bs, reply, readbuf, bwr.read_consumed, 0);
+ res = binder_parse(bs, reply, (uintptr_t) readbuf, bwr.read_consumed, 0);
if (res == 0) return 0;
if (res < 0) goto fail;
}
@@ -358,19 +370,19 @@
{
int res;
struct binder_write_read bwr;
- unsigned readbuf[32];
+ uint32_t readbuf[32];
bwr.write_size = 0;
bwr.write_consumed = 0;
bwr.write_buffer = 0;
-
+
readbuf[0] = BC_ENTER_LOOPER;
- binder_write(bs, readbuf, sizeof(unsigned));
+ binder_write(bs, readbuf, sizeof(uint32_t));
for (;;) {
bwr.read_size = sizeof(readbuf);
bwr.read_consumed = 0;
- bwr.read_buffer = (unsigned) readbuf;
+ bwr.read_buffer = (uintptr_t) readbuf;
res = ioctl(bs->fd, BINDER_WRITE_READ, &bwr);
@@ -379,7 +391,7 @@
break;
}
- res = binder_parse(bs, 0, readbuf, bwr.read_consumed, func);
+ res = binder_parse(bs, 0, (uintptr_t) readbuf, bwr.read_consumed, func);
if (res == 0) {
ALOGE("binder_loop: unexpected reply?!\n");
break;
@@ -391,19 +403,19 @@
}
}
-void bio_init_from_txn(struct binder_io *bio, struct binder_txn *txn)
+void bio_init_from_txn(struct binder_io *bio, struct binder_transaction_data *txn)
{
- bio->data = bio->data0 = txn->data;
- bio->offs = bio->offs0 = txn->offs;
+ bio->data = bio->data0 = (char *)(intptr_t)txn->data.ptr.buffer;
+ bio->offs = bio->offs0 = (binder_size_t *)(intptr_t)txn->data.ptr.offsets;
bio->data_avail = txn->data_size;
- bio->offs_avail = txn->offs_size / 4;
+ bio->offs_avail = txn->offsets_size / sizeof(size_t);
bio->flags = BIO_F_SHARED;
}
void bio_init(struct binder_io *bio, void *data,
- uint32_t maxdata, uint32_t maxoffs)
+ size_t maxdata, size_t maxoffs)
{
- uint32_t n = maxoffs * sizeof(uint32_t);
+ size_t n = maxoffs * sizeof(size_t);
if (n > maxdata) {
bio->flags = BIO_F_OVERFLOW;
@@ -419,12 +431,12 @@
bio->flags = 0;
}
-static void *bio_alloc(struct binder_io *bio, uint32_t size)
+static void *bio_alloc(struct binder_io *bio, size_t size)
{
size = (size + 3) & (~3);
if (size > bio->data_avail) {
bio->flags |= BIO_F_OVERFLOW;
- return 0;
+ return NULL;
} else {
void *ptr = bio->data;
bio->data += size;
@@ -437,21 +449,25 @@
struct binder_io *msg,
struct binder_io *reply)
{
+ struct {
+ uint32_t cmd;
+ uintptr_t buffer;
+ } __attribute__((packed)) data;
+
if (reply->flags & BIO_F_SHARED) {
- uint32_t cmd[2];
- cmd[0] = BC_FREE_BUFFER;
- cmd[1] = (uint32_t) reply->data0;
- binder_write(bs, cmd, sizeof(cmd));
+ data.cmd = BC_FREE_BUFFER;
+ data.buffer = (uintptr_t) reply->data0;
+ binder_write(bs, &data, sizeof(data));
reply->flags = 0;
}
}
-static struct binder_object *bio_alloc_obj(struct binder_io *bio)
+static struct flat_binder_object *bio_alloc_obj(struct binder_io *bio)
{
- struct binder_object *obj;
+ struct flat_binder_object *obj;
obj = bio_alloc(bio, sizeof(*obj));
-
+
if (obj && bio->offs_avail) {
bio->offs_avail--;
*bio->offs++ = ((char*) obj) - ((char*) bio->data0);
@@ -459,7 +475,7 @@
}
bio->flags |= BIO_F_OVERFLOW;
- return 0;
+ return NULL;
}
void bio_put_uint32(struct binder_io *bio, uint32_t n)
@@ -471,7 +487,7 @@
void bio_put_obj(struct binder_io *bio, void *ptr)
{
- struct binder_object *obj;
+ struct flat_binder_object *obj;
obj = bio_alloc_obj(bio);
if (!obj)
@@ -479,15 +495,15 @@
obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
obj->type = BINDER_TYPE_BINDER;
- obj->pointer = ptr;
+ obj->binder = (uintptr_t)ptr;
obj->cookie = 0;
}
-void bio_put_ref(struct binder_io *bio, void *ptr)
+void bio_put_ref(struct binder_io *bio, uint32_t handle)
{
- struct binder_object *obj;
+ struct flat_binder_object *obj;
- if (ptr)
+ if (handle)
obj = bio_alloc_obj(bio);
else
obj = bio_alloc(bio, sizeof(*obj));
@@ -497,13 +513,13 @@
obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
obj->type = BINDER_TYPE_HANDLE;
- obj->pointer = ptr;
+ obj->handle = handle;
obj->cookie = 0;
}
void bio_put_string16(struct binder_io *bio, const uint16_t *str)
{
- uint32_t len;
+ size_t len;
uint16_t *ptr;
if (!str) {
@@ -519,7 +535,8 @@
return;
}
- bio_put_uint32(bio, len);
+ /* Note: The payload will carry 32bit size instead of size_t */
+ bio_put_uint32(bio, (uint32_t) len);
len = (len + 1) * sizeof(uint16_t);
ptr = bio_alloc(bio, len);
if (ptr)
@@ -529,7 +546,7 @@
void bio_put_string16_x(struct binder_io *bio, const char *_str)
{
unsigned char *str = (unsigned char*) _str;
- uint32_t len;
+ size_t len;
uint16_t *ptr;
if (!str) {
@@ -544,6 +561,7 @@
return;
}
+ /* Note: The payload will carry 32bit size instead of size_t */
bio_put_uint32(bio, len);
ptr = bio_alloc(bio, (len + 1) * sizeof(uint16_t));
if (!ptr)
@@ -554,14 +572,14 @@
*ptr++ = 0;
}
-static void *bio_get(struct binder_io *bio, uint32_t size)
+static void *bio_get(struct binder_io *bio, size_t size)
{
size = (size + 3) & (~3);
if (bio->data_avail < size){
bio->data_avail = 0;
bio->flags |= BIO_F_OVERFLOW;
- return 0;
+ return NULL;
} else {
void *ptr = bio->data;
bio->data += size;
@@ -576,41 +594,43 @@
return ptr ? *ptr : 0;
}
-uint16_t *bio_get_string16(struct binder_io *bio, unsigned *sz)
+uint16_t *bio_get_string16(struct binder_io *bio, size_t *sz)
{
- unsigned len;
- len = bio_get_uint32(bio);
+ size_t len;
+
+ /* Note: The payload will carry 32bit size instead of size_t */
+ len = (size_t) bio_get_uint32(bio);
if (sz)
*sz = len;
return bio_get(bio, (len + 1) * sizeof(uint16_t));
}
-static struct binder_object *_bio_get_obj(struct binder_io *bio)
+static struct flat_binder_object *_bio_get_obj(struct binder_io *bio)
{
- unsigned n;
- unsigned off = bio->data - bio->data0;
+ size_t n;
+ size_t off = bio->data - bio->data0;
- /* TODO: be smarter about this? */
+ /* TODO: be smarter about this? */
for (n = 0; n < bio->offs_avail; n++) {
if (bio->offs[n] == off)
- return bio_get(bio, sizeof(struct binder_object));
+ return bio_get(bio, sizeof(struct flat_binder_object));
}
bio->data_avail = 0;
bio->flags |= BIO_F_OVERFLOW;
- return 0;
+ return NULL;
}
-void *bio_get_ref(struct binder_io *bio)
+uint32_t bio_get_ref(struct binder_io *bio)
{
- struct binder_object *obj;
+ struct flat_binder_object *obj;
obj = _bio_get_obj(bio);
if (!obj)
return 0;
if (obj->type == BINDER_TYPE_HANDLE)
- return obj->pointer;
+ return obj->handle;
return 0;
}
diff --git a/cmds/servicemanager/binder.h b/cmds/servicemanager/binder.h
index d8c51ef..7915fc2 100644
--- a/cmds/servicemanager/binder.h
+++ b/cmds/servicemanager/binder.h
@@ -9,39 +9,15 @@
struct binder_state;
-struct binder_object
-{
- uint32_t type;
- uint32_t flags;
- void *pointer;
- void *cookie;
-};
-
-struct binder_txn
-{
- void *target;
- void *cookie;
- uint32_t code;
- uint32_t flags;
-
- uint32_t sender_pid;
- uint32_t sender_euid;
-
- uint32_t data_size;
- uint32_t offs_size;
- void *data;
- void *offs;
-};
-
struct binder_io
{
char *data; /* pointer to read/write from */
- uint32_t *offs; /* array of offsets */
- uint32_t data_avail; /* bytes available in data buffer */
- uint32_t offs_avail; /* entries available in offsets array */
+ binder_size_t *offs; /* array of offsets */
+ size_t data_avail; /* bytes available in data buffer */
+ size_t offs_avail; /* entries available in offsets array */
char *data0; /* start of data buffer */
- uint32_t *offs0; /* start of offsets buffer */
+ binder_size_t *offs0; /* start of offsets buffer */
uint32_t flags;
uint32_t unused;
};
@@ -49,14 +25,16 @@
struct binder_death {
void (*func)(struct binder_state *bs, void *ptr);
void *ptr;
-};
+};
-/* the one magic object */
-#define BINDER_SERVICE_MANAGER ((void*) 0)
+/* the one magic handle */
+#define BINDER_SERVICE_MANAGER 0U
#define SVC_MGR_NAME "android.os.IServiceManager"
enum {
+ /* Must match definitions in IBinder.h and IServiceManager.h */
+ PING_TRANSACTION = B_PACK_CHARS('_','P','N','G'),
SVC_MGR_GET_SERVICE = 1,
SVC_MGR_CHECK_SERVICE,
SVC_MGR_ADD_SERVICE,
@@ -64,11 +42,11 @@
};
typedef int (*binder_handler)(struct binder_state *bs,
- struct binder_txn *txn,
+ struct binder_transaction_data *txn,
struct binder_io *msg,
struct binder_io *reply);
-struct binder_state *binder_open(unsigned mapsize);
+struct binder_state *binder_open(size_t mapsize);
void binder_close(struct binder_state *bs);
/* initiate a blocking binder call
@@ -76,7 +54,7 @@
*/
int binder_call(struct binder_state *bs,
struct binder_io *msg, struct binder_io *reply,
- void *target, uint32_t code);
+ uint32_t target, uint32_t code);
/* release any state associate with the binder_io
* - call once any necessary data has been extracted from the
@@ -87,10 +65,10 @@
struct binder_io *msg, struct binder_io *reply);
/* manipulate strong references */
-void binder_acquire(struct binder_state *bs, void *ptr);
-void binder_release(struct binder_state *bs, void *ptr);
+void binder_acquire(struct binder_state *bs, uint32_t target);
+void binder_release(struct binder_state *bs, uint32_t target);
-void binder_link_to_death(struct binder_state *bs, void *ptr, struct binder_death *death);
+void binder_link_to_death(struct binder_state *bs, uint32_t target, struct binder_death *death);
void binder_loop(struct binder_state *bs, binder_handler func);
@@ -101,19 +79,16 @@
* offset entries to reserve from the buffer
*/
void bio_init(struct binder_io *bio, void *data,
- uint32_t maxdata, uint32_t maxobjects);
-
-void bio_destroy(struct binder_io *bio);
+ size_t maxdata, size_t maxobjects);
void bio_put_obj(struct binder_io *bio, void *ptr);
-void bio_put_ref(struct binder_io *bio, void *ptr);
+void bio_put_ref(struct binder_io *bio, uint32_t handle);
void bio_put_uint32(struct binder_io *bio, uint32_t n);
void bio_put_string16(struct binder_io *bio, const uint16_t *str);
void bio_put_string16_x(struct binder_io *bio, const char *_str);
uint32_t bio_get_uint32(struct binder_io *bio);
-uint16_t *bio_get_string16(struct binder_io *bio, uint32_t *sz);
-void *bio_get_obj(struct binder_io *bio);
-void *bio_get_ref(struct binder_io *bio);
+uint16_t *bio_get_string16(struct binder_io *bio, size_t *sz);
+uint32_t bio_get_ref(struct binder_io *bio);
#endif
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 3eaf1eb..79ce6ed 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -24,7 +24,7 @@
* uid can register media.*, etc)
*/
static struct {
- unsigned uid;
+ uid_t uid;
const char *name;
} allowed[] = {
{ AID_MEDIA, "media.audio_flinger" },
@@ -50,9 +50,9 @@
{ AID_KEYSTORE, "android.security.keystore" },
};
-void *svcmgr_handle;
+uint32_t svcmgr_handle;
-const char *str8(uint16_t *x)
+const char *str8(const uint16_t *x)
{
static char buf[128];
unsigned max = 127;
@@ -67,7 +67,7 @@
return buf;
}
-int str16eq(uint16_t *a, const char *b)
+int str16eq(const uint16_t *a, const char *b)
{
while (*a && *b)
if (*a++ != *b++) return 0;
@@ -76,10 +76,10 @@
return 1;
}
-int svc_can_register(unsigned uid, uint16_t *name)
+int svc_can_register(uid_t uid, const uint16_t *name)
{
- unsigned n;
-
+ size_t n;
+
if ((uid == 0) || (uid == AID_SYSTEM))
return 1;
@@ -90,19 +90,19 @@
return 0;
}
-struct svcinfo
+struct svcinfo
{
struct svcinfo *next;
- void *ptr;
+ uint32_t handle;
struct binder_death death;
int allow_isolated;
- unsigned len;
+ size_t len;
uint16_t name[0];
};
-struct svcinfo *svclist = 0;
+struct svcinfo *svclist = NULL;
-struct svcinfo *find_svc(uint16_t *s16, unsigned len)
+struct svcinfo *find_svc(const uint16_t *s16, size_t len)
{
struct svcinfo *si;
@@ -112,112 +112,117 @@
return si;
}
}
- return 0;
+ return NULL;
}
void svcinfo_death(struct binder_state *bs, void *ptr)
{
- struct svcinfo *si = ptr;
+ struct svcinfo *si = (struct svcinfo* ) ptr;
+
ALOGI("service '%s' died\n", str8(si->name));
- if (si->ptr) {
- binder_release(bs, si->ptr);
- si->ptr = 0;
- }
+ if (si->handle) {
+ binder_release(bs, si->handle);
+ si->handle = 0;
+ }
}
-uint16_t svcmgr_id[] = {
+uint16_t svcmgr_id[] = {
'a','n','d','r','o','i','d','.','o','s','.',
- 'I','S','e','r','v','i','c','e','M','a','n','a','g','e','r'
+ 'I','S','e','r','v','i','c','e','M','a','n','a','g','e','r'
};
-
-void *do_find_service(struct binder_state *bs, uint16_t *s, unsigned len, unsigned uid)
+
+uint32_t do_find_service(struct binder_state *bs, const uint16_t *s, size_t len, uid_t uid)
{
struct svcinfo *si;
- si = find_svc(s, len);
-// ALOGI("check_service('%s') ptr = %p\n", str8(s), si ? si->ptr : 0);
- if (si && si->ptr) {
+ si = find_svc(s, len);
+ //ALOGI("check_service('%s') handle = %x\n", str8(s), si ? si->handle : 0);
+ if (si && si->handle) {
if (!si->allow_isolated) {
// If this service doesn't allow access from isolated processes,
// then check the uid to see if it is isolated.
- unsigned appid = uid % AID_USER;
+ uid_t appid = uid % AID_USER;
if (appid >= AID_ISOLATED_START && appid <= AID_ISOLATED_END) {
return 0;
}
}
- return si->ptr;
+ return si->handle;
} else {
return 0;
}
}
int do_add_service(struct binder_state *bs,
- uint16_t *s, unsigned len,
- void *ptr, unsigned uid, int allow_isolated)
+ const uint16_t *s, size_t len,
+ uint32_t handle, uid_t uid, int allow_isolated)
{
struct svcinfo *si;
- //ALOGI("add_service('%s',%p,%s) uid=%d\n", str8(s), ptr,
+
+ //ALOGI("add_service('%s',%x,%s) uid=%d\n", str8(s), handle,
// allow_isolated ? "allow_isolated" : "!allow_isolated", uid);
- if (!ptr || (len == 0) || (len > 127))
+ if (!handle || (len == 0) || (len > 127))
return -1;
if (!svc_can_register(uid, s)) {
- ALOGE("add_service('%s',%p) uid=%d - PERMISSION DENIED\n",
- str8(s), ptr, uid);
+ ALOGE("add_service('%s',%x) uid=%d - PERMISSION DENIED\n",
+ str8(s), handle, uid);
return -1;
}
si = find_svc(s, len);
if (si) {
- if (si->ptr) {
- ALOGE("add_service('%s',%p) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
- str8(s), ptr, uid);
+ if (si->handle) {
+ ALOGE("add_service('%s',%x) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
+ str8(s), handle, uid);
svcinfo_death(bs, si);
}
- si->ptr = ptr;
+ si->handle = handle;
} else {
si = malloc(sizeof(*si) + (len + 1) * sizeof(uint16_t));
if (!si) {
- ALOGE("add_service('%s',%p) uid=%d - OUT OF MEMORY\n",
- str8(s), ptr, uid);
+ ALOGE("add_service('%s',%x) uid=%d - OUT OF MEMORY\n",
+ str8(s), handle, uid);
return -1;
}
- si->ptr = ptr;
+ si->handle = handle;
si->len = len;
memcpy(si->name, s, (len + 1) * sizeof(uint16_t));
si->name[len] = '\0';
- si->death.func = svcinfo_death;
+ si->death.func = (void*) svcinfo_death;
si->death.ptr = si;
si->allow_isolated = allow_isolated;
si->next = svclist;
svclist = si;
}
- binder_acquire(bs, ptr);
- binder_link_to_death(bs, ptr, &si->death);
+ binder_acquire(bs, handle);
+ binder_link_to_death(bs, handle, &si->death);
return 0;
}
int svcmgr_handler(struct binder_state *bs,
- struct binder_txn *txn,
+ struct binder_transaction_data *txn,
struct binder_io *msg,
struct binder_io *reply)
{
struct svcinfo *si;
uint16_t *s;
- unsigned len;
- void *ptr;
+ size_t len;
+ uint32_t handle;
uint32_t strict_policy;
int allow_isolated;
-// ALOGI("target=%p code=%d pid=%d uid=%d\n",
-// txn->target, txn->code, txn->sender_pid, txn->sender_euid);
+ //ALOGI("target=%x code=%d pid=%d uid=%d\n",
+ // txn->target.handle, txn->code, txn->sender_pid, txn->sender_euid);
- if (txn->target != svcmgr_handle)
+ if (txn->target.handle != svcmgr_handle)
return -1;
+ if (txn->code == PING_TRANSACTION)
+ return 0;
+
// Equivalent to Parcel::enforceInterface(), reading the RPC
// header with the strict mode policy mask and the interface name.
// Note that we ignore the strict_policy and don't propagate it
@@ -234,22 +239,22 @@
case SVC_MGR_GET_SERVICE:
case SVC_MGR_CHECK_SERVICE:
s = bio_get_string16(msg, &len);
- ptr = do_find_service(bs, s, len, txn->sender_euid);
- if (!ptr)
+ handle = do_find_service(bs, s, len, txn->sender_euid);
+ if (!handle)
break;
- bio_put_ref(reply, ptr);
+ bio_put_ref(reply, handle);
return 0;
case SVC_MGR_ADD_SERVICE:
s = bio_get_string16(msg, &len);
- ptr = bio_get_ref(msg);
+ handle = bio_get_ref(msg);
allow_isolated = bio_get_uint32(msg) ? 1 : 0;
- if (do_add_service(bs, s, len, ptr, txn->sender_euid, allow_isolated))
+ if (do_add_service(bs, s, len, handle, txn->sender_euid, allow_isolated))
return -1;
break;
case SVC_MGR_LIST_SERVICES: {
- unsigned n = bio_get_uint32(msg);
+ uint32_t n = bio_get_uint32(msg);
si = svclist;
while ((n-- > 0) && si)
@@ -272,16 +277,20 @@
int main(int argc, char **argv)
{
struct binder_state *bs;
- void *svcmgr = BINDER_SERVICE_MANAGER;
bs = binder_open(128*1024);
+ if (!bs) {
+ ALOGE("failed to open binder driver\n");
+ return -1;
+ }
if (binder_become_context_manager(bs)) {
ALOGE("cannot become context manager (%s)\n", strerror(errno));
return -1;
}
- svcmgr_handle = svcmgr;
+ svcmgr_handle = BINDER_SERVICE_MANAGER;
binder_loop(bs, svcmgr_handler);
+
return 0;
}
diff --git a/include/android/input.h b/include/android/input.h
index fead769..a660761 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -583,7 +583,7 @@
* and views. */
float AMotionEvent_getXOffset(const AInputEvent* motion_event);
-/* Get the precision of the Y coordinates being reported.
+/* Get the Y coordinate offset.
* For touch events on the screen, this is the delta that was added to the raw
* screen coordinates to adjust for the absolute position of the containing windows
* and views. */
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h
index 5bc123e..6e0c01b 100644
--- a/include/binder/IPCThreadState.h
+++ b/include/binder/IPCThreadState.h
@@ -107,7 +107,7 @@
static void threadDestructor(void *st);
static void freeBuffer(Parcel* parcel,
const uint8_t* data, size_t dataSize,
- const size_t* objects, size_t objectsSize,
+ const binder_size_t* objects, size_t objectsSize,
void* cookie);
const sp<ProcessState> mProcess;
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index c95f297..ed2e7df 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -23,6 +23,7 @@
#include <utils/String16.h>
#include <utils/Vector.h>
#include <utils/Flattenable.h>
+#include <linux/binder.h>
// ---------------------------------------------------------------------------
namespace android {
@@ -35,9 +36,8 @@
class String8;
class TextOutput;
-struct flat_binder_object; // defined in support_p/binder_module.h
-
class Parcel {
+ friend class IPCThreadState;
public:
class ReadableBlob;
class WritableBlob;
@@ -81,7 +81,10 @@
void freeData();
- const size_t* objects() const;
+private:
+ const binder_size_t* objects() const;
+
+public:
size_t objectsCount() const;
status_t errorCheck() const;
@@ -193,19 +196,21 @@
// Explicitly close all file descriptors in the parcel.
void closeFileDescriptors();
+private:
typedef void (*release_func)(Parcel* parcel,
const uint8_t* data, size_t dataSize,
- const size_t* objects, size_t objectsSize,
+ const binder_size_t* objects, size_t objectsSize,
void* cookie);
- const uint8_t* ipcData() const;
+ uintptr_t ipcData() const;
size_t ipcDataSize() const;
- const size_t* ipcObjects() const;
+ uintptr_t ipcObjects() const;
size_t ipcObjectsCount() const;
void ipcSetDataReference(const uint8_t* data, size_t dataSize,
- const size_t* objects, size_t objectsCount,
+ const binder_size_t* objects, size_t objectsCount,
release_func relFunc, void* relCookie);
+public:
void print(TextOutput& to, uint32_t flags = 0) const;
private:
@@ -218,6 +223,9 @@
status_t growData(size_t len);
status_t restartWrite(size_t desired);
status_t continueWrite(size_t desired);
+ status_t writePointer(uintptr_t val);
+ status_t readPointer(uintptr_t *pArg) const;
+ uintptr_t readPointer() const;
void freeDataNoInit();
void initState();
void scanForFds() const;
@@ -235,7 +243,7 @@
size_t mDataSize;
size_t mDataCapacity;
mutable size_t mDataPos;
- size_t* mObjects;
+ binder_size_t* mObjects;
size_t mObjectsSize;
size_t mObjectsCapacity;
mutable size_t mNextObjectHint;
diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk
index f3f8daf..673fc82 100644
--- a/libs/binder/Android.mk
+++ b/libs/binder/Android.mk
@@ -42,6 +42,11 @@
LOCAL_MODULE := libbinder
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
LOCAL_SRC_FILES := $(sources)
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1
+endif
+endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
@@ -49,4 +54,9 @@
LOCAL_MODULE := libbinder
LOCAL_STATIC_LIBRARIES += libutils
LOCAL_SRC_FILES := $(sources)
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1
+endif
+endif
include $(BUILD_STATIC_LIBRARY)
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 1f21f9c..71e62ab 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -39,7 +39,7 @@
// ---------------------------------------------------------------------------
-sp<IInterface> IBinder::queryLocalInterface(const String16& descriptor)
+sp<IInterface> IBinder::queryLocalInterface(const String16& /*descriptor*/)
{
return NULL;
}
@@ -117,19 +117,20 @@
}
status_t BBinder::linkToDeath(
- const sp<DeathRecipient>& recipient, void* cookie, uint32_t flags)
+ const sp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+ uint32_t /*flags*/)
{
return INVALID_OPERATION;
}
status_t BBinder::unlinkToDeath(
- const wp<DeathRecipient>& recipient, void* cookie, uint32_t flags,
- wp<DeathRecipient>* outRecipient)
+ const wp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+ uint32_t /*flags*/, wp<DeathRecipient>* /*outRecipient*/)
{
return INVALID_OPERATION;
}
-status_t BBinder::dump(int fd, const Vector<String16>& args)
+ status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/)
{
return NO_ERROR;
}
@@ -142,8 +143,13 @@
if (!e) {
e = new Extras;
+#ifdef __LP64__
+ if (android_atomic_release_cas64(0, reinterpret_cast<int64_t>(e),
+ reinterpret_cast<volatile int64_t*>(&mExtras)) != 0) {
+#else
if (android_atomic_cmpxchg(0, reinterpret_cast<int32_t>(e),
reinterpret_cast<volatile int32_t*>(&mExtras)) != 0) {
+#endif
delete e;
e = mExtras;
}
@@ -184,7 +190,7 @@
status_t BBinder::onTransact(
- uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+ uint32_t code, const Parcel& data, Parcel* reply, uint32_t /*flags*/)
{
switch (code) {
case INTERFACE_TRANSACTION:
@@ -246,14 +252,14 @@
android_atomic_or(kRemoteAcquired, &mState);
}
-void BpRefBase::onLastStrongRef(const void* id)
+void BpRefBase::onLastStrongRef(const void* /*id*/)
{
if (mRemote) {
mRemote->decStrong(this);
}
}
-bool BpRefBase::onIncStrongAttempted(uint32_t flags, const void* id)
+bool BpRefBase::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
{
return mRemote ? mRefs->attemptIncStrong(this) : false;
}
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index 47a62db..1bad67a 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -343,7 +343,7 @@
if (ipc) ipc->incStrongHandle(mHandle);
}
-void BpBinder::onLastStrongRef(const void* id)
+void BpBinder::onLastStrongRef(const void* /*id*/)
{
ALOGV("onLastStrongRef BpBinder %p handle %d\n", this, mHandle);
IF_ALOGV() {
@@ -353,7 +353,7 @@
if (ipc) ipc->decStrongHandle(mHandle);
}
-bool BpBinder::onIncStrongAttempted(uint32_t flags, const void* id)
+bool BpBinder::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
{
ALOGV("onIncStrongAttempted BpBinder %p handle %d\n", this, mHandle);
IPCThreadState* ipc = IPCThreadState::self();
diff --git a/libs/binder/Debug.cpp b/libs/binder/Debug.cpp
index a8b6e83..0ffafbb 100644
--- a/libs/binder/Debug.cpp
+++ b/libs/binder/Debug.cpp
@@ -38,7 +38,7 @@
// ---------------------------------------------------------------------
-static void defaultPrintFunc(void* cookie, const char* txt)
+static void defaultPrintFunc(void* /*cookie*/, const char* txt)
{
printf("%s", txt);
}
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp
index 07cb41a..d8ed995 100644
--- a/libs/binder/IMemory.cpp
+++ b/libs/binder/IMemory.cpp
@@ -244,7 +244,7 @@
sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
if (VERBOSE) {
- ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
+ ALOGD("UNMAPPING binder=%p, heap=%p, size=%zu, fd=%d",
binder.get(), this, mSize, mHeapId);
CallStack stack(LOG_TAG);
}
@@ -296,11 +296,11 @@
uint32_t flags = reply.readInt32();
uint32_t offset = reply.readInt32();
- ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%zd, err=%d (%s)",
asBinder().get(), parcel_fd, size, err, strerror(-err));
int fd = dup( parcel_fd );
- ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%zd, err=%d (%s)",
parcel_fd, size, err, strerror(errno));
int access = PROT_READ;
@@ -313,7 +313,7 @@
mRealHeap = true;
mBase = mmap(0, size, access, MAP_SHARED, fd, offset);
if (mBase == MAP_FAILED) {
- ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
+ ALOGE("cannot map BpMemoryHeap (binder=%p), size=%zd, fd=%d (%s)",
asBinder().get(), size, fd, strerror(errno));
close(fd);
} else {
@@ -402,7 +402,7 @@
if (i>=0) {
heap_info_t& info = mHeapCache.editValueAt(i);
ALOGD_IF(VERBOSE,
- "found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+ "found binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
binder.get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -435,7 +435,7 @@
int32_t c = android_atomic_dec(&info.count);
if (c == 1) {
ALOGD_IF(VERBOSE,
- "removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+ "removing binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
binder.unsafe_get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -466,7 +466,7 @@
for (int i=0 ; i<c ; i++) {
const heap_info_t& info = mHeapCache.valueAt(i);
BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
- ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
+ ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%zu)",
mHeapCache.keyAt(i).unsafe_get(),
info.heap.get(), info.count,
h->mHeapId, h->mBase, h->mSize);
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 5951a3f..cb42549 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -533,7 +533,7 @@
return result;
}
-void IPCThreadState::stopProcess(bool immediate)
+void IPCThreadState::stopProcess(bool /*immediate*/)
{
//ALOGI("**** STOPPING PROCESS");
flushCommands();
@@ -663,7 +663,7 @@
{
mOut.writeInt32(BC_REQUEST_DEATH_NOTIFICATION);
mOut.writeInt32((int32_t)handle);
- mOut.writeInt32((int32_t)proxy);
+ mOut.writePointer((uintptr_t)proxy);
return NO_ERROR;
}
@@ -671,7 +671,7 @@
{
mOut.writeInt32(BC_CLEAR_DEATH_NOTIFICATION);
mOut.writeInt32((int32_t)handle);
- mOut.writeInt32((int32_t)proxy);
+ mOut.writePointer((uintptr_t)proxy);
return NO_ERROR;
}
@@ -753,23 +753,23 @@
reply->ipcSetDataReference(
reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
tr.data_size,
- reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
- tr.offsets_size/sizeof(size_t),
+ reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+ tr.offsets_size/sizeof(binder_size_t),
freeBuffer, this);
} else {
- err = *static_cast<const status_t*>(tr.data.ptr.buffer);
+ err = *reinterpret_cast<const status_t*>(tr.data.ptr.buffer);
freeBuffer(NULL,
reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
tr.data_size,
- reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
- tr.offsets_size/sizeof(size_t), this);
+ reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+ tr.offsets_size/sizeof(binder_size_t), this);
}
} else {
freeBuffer(NULL,
reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
tr.data_size,
- reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
- tr.offsets_size/sizeof(size_t), this);
+ reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+ tr.offsets_size/sizeof(binder_size_t), this);
continue;
}
}
@@ -809,12 +809,12 @@
const size_t outAvail = (!doReceive || needRead) ? mOut.dataSize() : 0;
bwr.write_size = outAvail;
- bwr.write_buffer = (long unsigned int)mOut.data();
+ bwr.write_buffer = (uintptr_t)mOut.data();
// This is what we'll read.
if (doReceive && needRead) {
bwr.read_size = mIn.dataCapacity();
- bwr.read_buffer = (long unsigned int)mIn.data();
+ bwr.read_buffer = (uintptr_t)mIn.data();
} else {
bwr.read_size = 0;
bwr.read_buffer = 0;
@@ -861,14 +861,14 @@
} while (err == -EINTR);
IF_LOG_COMMANDS() {
- alog << "Our err: " << (void*)err << ", write consumed: "
+ alog << "Our err: " << (void*)(intptr_t)err << ", write consumed: "
<< bwr.write_consumed << " (of " << mOut.dataSize()
<< "), read consumed: " << bwr.read_consumed << endl;
}
if (err >= NO_ERROR) {
if (bwr.write_consumed > 0) {
- if (bwr.write_consumed < (ssize_t)mOut.dataSize())
+ if (bwr.write_consumed < mOut.dataSize())
mOut.remove(0, bwr.write_consumed);
else
mOut.setDataSize(0);
@@ -909,15 +909,15 @@
if (err == NO_ERROR) {
tr.data_size = data.ipcDataSize();
tr.data.ptr.buffer = data.ipcData();
- tr.offsets_size = data.ipcObjectsCount()*sizeof(size_t);
+ tr.offsets_size = data.ipcObjectsCount()*sizeof(binder_size_t);
tr.data.ptr.offsets = data.ipcObjects();
} else if (statusBuffer) {
tr.flags |= TF_STATUS_CODE;
*statusBuffer = err;
tr.data_size = sizeof(status_t);
- tr.data.ptr.buffer = statusBuffer;
+ tr.data.ptr.buffer = reinterpret_cast<binder_uintptr_t>(statusBuffer);
tr.offsets_size = 0;
- tr.data.ptr.offsets = NULL;
+ tr.data.ptr.offsets = 0;
} else {
return (mLastError = err);
}
@@ -950,8 +950,8 @@
break;
case BR_ACQUIRE:
- refs = (RefBase::weakref_type*)mIn.readInt32();
- obj = (BBinder*)mIn.readInt32();
+ refs = (RefBase::weakref_type*)mIn.readPointer();
+ obj = (BBinder*)mIn.readPointer();
ALOG_ASSERT(refs->refBase() == obj,
"BR_ACQUIRE: object %p does not match cookie %p (expected %p)",
refs, obj, refs->refBase());
@@ -961,13 +961,13 @@
obj->printRefs();
}
mOut.writeInt32(BC_ACQUIRE_DONE);
- mOut.writeInt32((int32_t)refs);
- mOut.writeInt32((int32_t)obj);
+ mOut.writePointer((uintptr_t)refs);
+ mOut.writePointer((uintptr_t)obj);
break;
case BR_RELEASE:
- refs = (RefBase::weakref_type*)mIn.readInt32();
- obj = (BBinder*)mIn.readInt32();
+ refs = (RefBase::weakref_type*)mIn.readPointer();
+ obj = (BBinder*)mIn.readPointer();
ALOG_ASSERT(refs->refBase() == obj,
"BR_RELEASE: object %p does not match cookie %p (expected %p)",
refs, obj, refs->refBase());
@@ -979,17 +979,17 @@
break;
case BR_INCREFS:
- refs = (RefBase::weakref_type*)mIn.readInt32();
- obj = (BBinder*)mIn.readInt32();
+ refs = (RefBase::weakref_type*)mIn.readPointer();
+ obj = (BBinder*)mIn.readPointer();
refs->incWeak(mProcess.get());
mOut.writeInt32(BC_INCREFS_DONE);
- mOut.writeInt32((int32_t)refs);
- mOut.writeInt32((int32_t)obj);
+ mOut.writePointer((uintptr_t)refs);
+ mOut.writePointer((uintptr_t)obj);
break;
case BR_DECREFS:
- refs = (RefBase::weakref_type*)mIn.readInt32();
- obj = (BBinder*)mIn.readInt32();
+ refs = (RefBase::weakref_type*)mIn.readPointer();
+ obj = (BBinder*)mIn.readPointer();
// NOTE: This assertion is not valid, because the object may no
// longer exist (thus the (BBinder*)cast above resulting in a different
// memory address).
@@ -1000,8 +1000,8 @@
break;
case BR_ATTEMPT_ACQUIRE:
- refs = (RefBase::weakref_type*)mIn.readInt32();
- obj = (BBinder*)mIn.readInt32();
+ refs = (RefBase::weakref_type*)mIn.readPointer();
+ obj = (BBinder*)mIn.readPointer();
{
const bool success = refs->attemptIncStrong(mProcess.get());
@@ -1026,8 +1026,8 @@
buffer.ipcSetDataReference(
reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
tr.data_size,
- reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
- tr.offsets_size/sizeof(size_t), freeBuffer, this);
+ reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+ tr.offsets_size/sizeof(binder_size_t), freeBuffer, this);
const pid_t origPid = mCallingPid;
const uid_t origUid = mCallingUid;
@@ -1103,15 +1103,15 @@
case BR_DEAD_BINDER:
{
- BpBinder *proxy = (BpBinder*)mIn.readInt32();
+ BpBinder *proxy = (BpBinder*)mIn.readPointer();
proxy->sendObituary();
mOut.writeInt32(BC_DEAD_BINDER_DONE);
- mOut.writeInt32((int32_t)proxy);
+ mOut.writePointer((uintptr_t)proxy);
} break;
case BR_CLEAR_DEATH_NOTIFICATION_DONE:
{
- BpBinder *proxy = (BpBinder*)mIn.readInt32();
+ BpBinder *proxy = (BpBinder*)mIn.readPointer();
proxy->getWeakRefs()->decWeak(proxy);
} break;
@@ -1154,9 +1154,10 @@
}
-void IPCThreadState::freeBuffer(Parcel* parcel, const uint8_t* data, size_t dataSize,
- const size_t* objects, size_t objectsSize,
- void* cookie)
+void IPCThreadState::freeBuffer(Parcel* parcel, const uint8_t* data,
+ size_t /*dataSize*/,
+ const binder_size_t* /*objects*/,
+ size_t /*objectsSize*/, void* /*cookie*/)
{
//ALOGI("Freeing parcel %p", &parcel);
IF_LOG_COMMANDS() {
@@ -1166,7 +1167,7 @@
if (parcel != NULL) parcel->closeFileDescriptors();
IPCThreadState* state = self();
state->mOut.writeInt32(BC_FREE_BUFFER);
- state->mOut.writeInt32((int32_t)data);
+ state->mOut.writePointer((uintptr_t)data);
}
}; // namespace android
diff --git a/libs/binder/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp
index 8d0e0a7..a14c100 100644
--- a/libs/binder/MemoryDealer.cpp
+++ b/libs/binder/MemoryDealer.cpp
@@ -210,7 +210,7 @@
#ifdef MADV_REMOVE
if (size) {
int err = madvise(start_ptr, size, MADV_REMOVE);
- ALOGW_IF(err, "madvise(%p, %u, MADV_REMOVE) returned %s",
+ ALOGW_IF(err, "madvise(%p, %zu, MADV_REMOVE) returned %s",
start_ptr, size, err<0 ? strerror(errno) : "Ok");
}
#endif
@@ -445,8 +445,8 @@
int np = ((cur->next) && cur->next->prev != cur) ? 1 : 0;
int pn = ((cur->prev) && cur->prev->next != cur) ? 2 : 0;
- snprintf(buffer, SIZE, " %3u: %08x | 0x%08X | 0x%08X | %s %s\n",
- i, int(cur), int(cur->start*kMemoryAlign),
+ snprintf(buffer, SIZE, " %3u: %p | 0x%08X | 0x%08X | %s %s\n",
+ i, cur, int(cur->start*kMemoryAlign),
int(cur->size*kMemoryAlign),
int(cur->free) ? "F" : "A",
errs[np|pn]);
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 38e019c..03bcf01 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -77,12 +77,12 @@
case BINDER_TYPE_BINDER:
if (obj.binder) {
LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie);
- static_cast<IBinder*>(obj.cookie)->incStrong(who);
+ reinterpret_cast<IBinder*>(obj.cookie)->incStrong(who);
}
return;
case BINDER_TYPE_WEAK_BINDER:
if (obj.binder)
- static_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who);
+ reinterpret_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who);
return;
case BINDER_TYPE_HANDLE: {
const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle);
@@ -104,7 +104,7 @@
}
}
- ALOGD("Invalid object type 0x%08lx", obj.type);
+ ALOGD("Invalid object type 0x%08x", obj.type);
}
void release_object(const sp<ProcessState>& proc,
@@ -114,12 +114,12 @@
case BINDER_TYPE_BINDER:
if (obj.binder) {
LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie);
- static_cast<IBinder*>(obj.cookie)->decStrong(who);
+ reinterpret_cast<IBinder*>(obj.cookie)->decStrong(who);
}
return;
case BINDER_TYPE_WEAK_BINDER:
if (obj.binder)
- static_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who);
+ reinterpret_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who);
return;
case BINDER_TYPE_HANDLE: {
const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle);
@@ -135,21 +135,21 @@
return;
}
case BINDER_TYPE_FD: {
- if (obj.cookie != (void*)0) close(obj.handle);
+ if (obj.cookie != 0) close(obj.handle);
return;
}
}
- ALOGE("Invalid object type 0x%08lx", obj.type);
+ ALOGE("Invalid object type 0x%08x", obj.type);
}
inline static status_t finish_flatten_binder(
- const sp<IBinder>& binder, const flat_binder_object& flat, Parcel* out)
+ const sp<IBinder>& /*binder*/, const flat_binder_object& flat, Parcel* out)
{
return out->writeObject(flat, false);
}
-status_t flatten_binder(const sp<ProcessState>& proc,
+status_t flatten_binder(const sp<ProcessState>& /*proc*/,
const sp<IBinder>& binder, Parcel* out)
{
flat_binder_object obj;
@@ -165,22 +165,22 @@
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_HANDLE;
obj.handle = handle;
- obj.cookie = NULL;
+ obj.cookie = 0;
} else {
obj.type = BINDER_TYPE_BINDER;
- obj.binder = local->getWeakRefs();
- obj.cookie = local;
+ obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs());
+ obj.cookie = reinterpret_cast<uintptr_t>(local);
}
} else {
obj.type = BINDER_TYPE_BINDER;
- obj.binder = NULL;
- obj.cookie = NULL;
+ obj.binder = 0;
+ obj.cookie = 0;
}
return finish_flatten_binder(binder, obj, out);
}
-status_t flatten_binder(const sp<ProcessState>& proc,
+status_t flatten_binder(const sp<ProcessState>& /*proc*/,
const wp<IBinder>& binder, Parcel* out)
{
flat_binder_object obj;
@@ -198,11 +198,11 @@
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_WEAK_HANDLE;
obj.handle = handle;
- obj.cookie = NULL;
+ obj.cookie = 0;
} else {
obj.type = BINDER_TYPE_WEAK_BINDER;
- obj.binder = binder.get_refs();
- obj.cookie = binder.unsafe_get();
+ obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs());
+ obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get());
}
return finish_flatten_binder(real, obj, out);
}
@@ -216,20 +216,21 @@
// implementation we are using.
ALOGE("Unable to unflatten Binder weak reference!");
obj.type = BINDER_TYPE_BINDER;
- obj.binder = NULL;
- obj.cookie = NULL;
+ obj.binder = 0;
+ obj.cookie = 0;
return finish_flatten_binder(NULL, obj, out);
} else {
obj.type = BINDER_TYPE_BINDER;
- obj.binder = NULL;
- obj.cookie = NULL;
+ obj.binder = 0;
+ obj.cookie = 0;
return finish_flatten_binder(NULL, obj, out);
}
}
inline static status_t finish_unflatten_binder(
- BpBinder* proxy, const flat_binder_object& flat, const Parcel& in)
+ BpBinder* /*proxy*/, const flat_binder_object& /*flat*/,
+ const Parcel& /*in*/)
{
return NO_ERROR;
}
@@ -242,7 +243,7 @@
if (flat) {
switch (flat->type) {
case BINDER_TYPE_BINDER:
- *out = static_cast<IBinder*>(flat->cookie);
+ *out = reinterpret_cast<IBinder*>(flat->cookie);
return finish_unflatten_binder(NULL, *flat, in);
case BINDER_TYPE_HANDLE:
*out = proc->getStrongProxyForHandle(flat->handle);
@@ -261,13 +262,13 @@
if (flat) {
switch (flat->type) {
case BINDER_TYPE_BINDER:
- *out = static_cast<IBinder*>(flat->cookie);
+ *out = reinterpret_cast<IBinder*>(flat->cookie);
return finish_unflatten_binder(NULL, *flat, in);
case BINDER_TYPE_WEAK_BINDER:
- if (flat->binder != NULL) {
+ if (flat->binder != 0) {
out->set_object_and_refs(
- static_cast<IBinder*>(flat->cookie),
- static_cast<RefBase::weakref_type*>(flat->binder));
+ reinterpret_cast<IBinder*>(flat->cookie),
+ reinterpret_cast<RefBase::weakref_type*>(flat->binder));
} else {
*out = NULL;
}
@@ -364,7 +365,7 @@
const sp<ProcessState> proc(ProcessState::self());
status_t err;
const uint8_t *data = parcel->mData;
- const size_t *objects = parcel->mObjects;
+ const binder_size_t *objects = parcel->mObjects;
size_t size = parcel->mObjectsSize;
int startPos = mDataPos;
int firstIndex = -1, lastIndex = -2;
@@ -411,9 +412,9 @@
// grow objects
if (mObjectsCapacity < mObjectsSize + numObjects) {
int newSize = ((mObjectsSize + numObjects)*3)/2;
- size_t *objects =
- (size_t*)realloc(mObjects, newSize*sizeof(size_t));
- if (objects == (size_t*)0) {
+ binder_size_t *objects =
+ (binder_size_t*)realloc(mObjects, newSize*sizeof(binder_size_t));
+ if (objects == (binder_size_t*)0) {
return NO_MEMORY;
}
mObjects = objects;
@@ -436,7 +437,7 @@
// new Parcel now owns its own fd, and can declare that we
// officially know we have fds.
flat->handle = dup(flat->handle);
- flat->cookie = (void*)1;
+ flat->cookie = 1;
mHasFds = mFdsKnown = true;
if (!mAllowFds) {
err = FDS_NOT_ALLOWED;
@@ -511,7 +512,7 @@
}
}
-const size_t* Parcel::objects() const
+const binder_size_t* Parcel::objects() const
{
return mObjects;
}
@@ -633,6 +634,11 @@
return writeAligned(val);
}
+status_t Parcel::writePointer(uintptr_t val)
+{
+ return writeAligned<binder_uintptr_t>(val);
+}
+
status_t Parcel::writeFloat(float val)
{
return writeAligned(val);
@@ -743,7 +749,7 @@
obj.type = BINDER_TYPE_FD;
obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
obj.handle = fd;
- obj.cookie = (void*) (takeOwnership ? 1 : 0);
+ obj.cookie = takeOwnership ? 1 : 0;
return writeObject(obj, true);
}
@@ -853,7 +859,7 @@
*reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val;
// Need to write meta-data?
- if (nullMetaData || val.binder != NULL) {
+ if (nullMetaData || val.binder != 0) {
mObjects[mObjectsSize] = mDataPos;
acquire_object(ProcessState::self(), val, this);
mObjectsSize++;
@@ -876,7 +882,7 @@
}
if (!enoughObjects) {
size_t newSize = ((mObjectsSize+2)*3)/2;
- size_t* objects = (size_t*)realloc(mObjects, newSize*sizeof(size_t));
+ binder_size_t* objects = (binder_size_t*)realloc(mObjects, newSize*sizeof(binder_size_t));
if (objects == NULL) return NO_MEMORY;
mObjects = objects;
mObjectsCapacity = newSize;
@@ -890,7 +896,7 @@
return writeInt32(0);
}
-void Parcel::remove(size_t start, size_t amt)
+void Parcel::remove(size_t /*start*/, size_t /*amt*/)
{
LOG_ALWAYS_FATAL("Parcel::remove() not yet implemented!");
}
@@ -978,6 +984,22 @@
return readAligned<int64_t>();
}
+status_t Parcel::readPointer(uintptr_t *pArg) const
+{
+ status_t ret;
+ binder_uintptr_t ptr;
+ ret = readAligned(&ptr);
+ if (!ret)
+ *pArg = ptr;
+ return ret;
+}
+
+uintptr_t Parcel::readPointer() const
+{
+ return readAligned<binder_uintptr_t>();
+}
+
+
status_t Parcel::readFloat(float *pArg) const
{
return readAligned(pArg);
@@ -1223,7 +1245,7 @@
const flat_binder_object* obj
= reinterpret_cast<const flat_binder_object*>(mData+DPOS);
mDataPos = DPOS + sizeof(flat_binder_object);
- if (!nullMetaData && (obj->cookie == NULL && obj->binder == NULL)) {
+ if (!nullMetaData && (obj->cookie == 0 && obj->binder == 0)) {
// When transferring a NULL object, we don't write it into
// the object list, so we don't want to check for it when
// reading.
@@ -1232,7 +1254,7 @@
}
// Ensure that this object is valid...
- size_t* const OBJS = mObjects;
+ binder_size_t* const OBJS = mObjects;
const size_t N = mObjectsSize;
size_t opos = mNextObjectHint;
@@ -1271,7 +1293,7 @@
return obj;
}
}
- ALOGW("Attempt to read object from Parcel %p at offset %d that is not in the object list",
+ ALOGW("Attempt to read object from Parcel %p at offset %zu that is not in the object list",
this, DPOS);
}
return NULL;
@@ -1294,9 +1316,9 @@
}
}
-const uint8_t* Parcel::ipcData() const
+uintptr_t Parcel::ipcData() const
{
- return mData;
+ return reinterpret_cast<uintptr_t>(mData);
}
size_t Parcel::ipcDataSize() const
@@ -1304,9 +1326,9 @@
return (mDataSize > mDataPos ? mDataSize : mDataPos);
}
-const size_t* Parcel::ipcObjects() const
+uintptr_t Parcel::ipcObjects() const
{
- return mObjects;
+ return reinterpret_cast<uintptr_t>(mObjects);
}
size_t Parcel::ipcObjectsCount() const
@@ -1315,7 +1337,7 @@
}
void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize,
- const size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie)
+ const binder_size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie)
{
freeDataNoInit();
mError = NO_ERROR;
@@ -1324,7 +1346,7 @@
//ALOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
mDataPos = 0;
ALOGV("setDataReference Setting data pos of %p to %d\n", this, mDataPos);
- mObjects = const_cast<size_t*>(objects);
+ mObjects = const_cast<binder_size_t*>(objects);
mObjectsSize = mObjectsCapacity = objectsCount;
mNextObjectHint = 0;
mOwner = relFunc;
@@ -1332,17 +1354,17 @@
scanForFds();
}
-void Parcel::print(TextOutput& to, uint32_t flags) const
+void Parcel::print(TextOutput& to, uint32_t /*flags*/) const
{
to << "Parcel(";
if (errorCheck() != NO_ERROR) {
const status_t err = errorCheck();
- to << "Error: " << (void*)err << " \"" << strerror(-err) << "\"";
+ to << "Error: " << (void*)(intptr_t)err << " \"" << strerror(-err) << "\"";
} else if (dataSize() > 0) {
const uint8_t* DATA = data();
to << indent << HexDump(DATA, dataSize()) << dedent;
- const size_t* OBJS = objects();
+ const binder_size_t* OBJS = objects();
const size_t N = objectsCount();
for (size_t i=0; i<N; i++) {
const flat_binder_object* flat
@@ -1363,7 +1385,7 @@
const sp<ProcessState> proc(ProcessState::self());
size_t i = mObjectsSize;
uint8_t* const data = mData;
- size_t* const objects = mObjects;
+ binder_size_t* const objects = mObjects;
while (i > 0) {
i--;
const flat_binder_object* flat
@@ -1377,7 +1399,7 @@
const sp<ProcessState> proc(ProcessState::self());
size_t i = mObjectsSize;
uint8_t* const data = mData;
- size_t* const objects = mObjects;
+ binder_size_t* const objects = mObjects;
while (i > 0) {
i--;
const flat_binder_object* flat
@@ -1478,10 +1500,10 @@
mError = NO_MEMORY;
return NO_MEMORY;
}
- size_t* objects = NULL;
+ binder_size_t* objects = NULL;
if (objectsSize) {
- objects = (size_t*)malloc(objectsSize*sizeof(size_t));
+ objects = (binder_size_t*)malloc(objectsSize*sizeof(binder_size_t));
if (!objects) {
free(data);
@@ -1501,7 +1523,7 @@
memcpy(data, mData, mDataSize < desired ? mDataSize : desired);
}
if (objects && mObjects) {
- memcpy(objects, mObjects, objectsSize*sizeof(size_t));
+ memcpy(objects, mObjects, objectsSize*sizeof(binder_size_t));
}
//ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
@@ -1528,8 +1550,8 @@
}
release_object(proc, *flat, this);
}
- size_t* objects =
- (size_t*)realloc(mObjects, objectsSize*sizeof(size_t));
+ binder_size_t* objects =
+ (binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t));
if (objects) {
mObjects = objects;
}
@@ -1568,7 +1590,7 @@
if(!(mDataCapacity == 0 && mObjects == NULL
&& mObjectsCapacity == 0)) {
- ALOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
+ ALOGE("continueWrite: %zu/%p/%zu/%zu", mDataCapacity, mObjects, mObjectsCapacity, desired);
}
mData = data;
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index c1e49bc..0163906 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -86,7 +86,7 @@
setContextObject(object, String16("default"));
}
-sp<IBinder> ProcessState::getContextObject(const sp<IBinder>& caller)
+sp<IBinder> ProcessState::getContextObject(const sp<IBinder>& /*caller*/)
{
return getStrongProxyForHandle(0);
}
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index 2b1a702..e2cd0d8 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -113,8 +113,8 @@
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -478,8 +478,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// copy argument usage
GLMessage_DataType *arg_usage = glmsg.add_args();
@@ -531,8 +531,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -842,8 +842,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -919,8 +919,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1188,8 +1188,8 @@
// copy argument buffers
GLMessage_DataType *arg_buffers = glmsg.add_args();
arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
+ arg_buffers->set_type(GLMessage::DataType::INT64);
+ arg_buffers->add_int64value((uintptr_t)buffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1223,8 +1223,8 @@
// copy argument framebuffers
GLMessage_DataType *arg_framebuffers = glmsg.add_args();
arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
+ arg_framebuffers->set_type(GLMessage::DataType::INT64);
+ arg_framebuffers->add_int64value((uintptr_t)framebuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1286,8 +1286,8 @@
// copy argument renderbuffers
GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1349,8 +1349,8 @@
// copy argument textures
GLMessage_DataType *arg_textures = glmsg.add_args();
arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
+ arg_textures->set_type(GLMessage::DataType::INT64);
+ arg_textures->add_int64value((uintptr_t)textures);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1616,8 +1616,8 @@
// copy argument indices
GLMessage_DataType *arg_indices = glmsg.add_args();
arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
+ arg_indices->set_type(GLMessage::DataType::INT64);
+ arg_indices->add_int64value((uintptr_t)indices);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1877,8 +1877,8 @@
// copy argument buffers
GLMessage_DataType *arg_buffers = glmsg.add_args();
arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
+ arg_buffers->set_type(GLMessage::DataType::INT64);
+ arg_buffers->add_int64value((uintptr_t)buffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1940,8 +1940,8 @@
// copy argument framebuffers
GLMessage_DataType *arg_framebuffers = glmsg.add_args();
arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
+ arg_framebuffers->set_type(GLMessage::DataType::INT64);
+ arg_framebuffers->add_int64value((uintptr_t)framebuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1975,8 +1975,8 @@
// copy argument renderbuffers
GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2010,8 +2010,8 @@
// copy argument textures
GLMessage_DataType *arg_textures = glmsg.add_args();
arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
+ arg_textures->set_type(GLMessage::DataType::INT64);
+ arg_textures->add_int64value((uintptr_t)textures);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2057,26 +2057,26 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument size
GLMessage_DataType *arg_size = glmsg.add_args();
arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
+ arg_size->set_type(GLMessage::DataType::INT64);
+ arg_size->add_int64value((uintptr_t)size);
// copy argument type
GLMessage_DataType *arg_type = glmsg.add_args();
arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::INT);
- arg_type->add_intvalue((int)type);
+ arg_type->set_type(GLMessage::DataType::INT64);
+ arg_type->add_int64value((uintptr_t)type);
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2125,26 +2125,26 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument size
GLMessage_DataType *arg_size = glmsg.add_args();
arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
+ arg_size->set_type(GLMessage::DataType::INT64);
+ arg_size->add_int64value((uintptr_t)size);
// copy argument type
GLMessage_DataType *arg_type = glmsg.add_args();
arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::INT);
- arg_type->add_intvalue((int)type);
+ arg_type->set_type(GLMessage::DataType::INT64);
+ arg_type->add_int64value((uintptr_t)type);
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2187,14 +2187,14 @@
// copy argument count
GLMessage_DataType *arg_count = glmsg.add_args();
arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
+ arg_count->set_type(GLMessage::DataType::INT64);
+ arg_count->add_int64value((uintptr_t)count);
// copy argument shaders
GLMessage_DataType *arg_shaders = glmsg.add_args();
arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
+ arg_shaders->set_type(GLMessage::DataType::INT64);
+ arg_shaders->add_int64value((uintptr_t)shaders);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2229,8 +2229,8 @@
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2272,8 +2272,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2313,8 +2313,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2378,8 +2378,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2425,8 +2425,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2460,8 +2460,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2501,8 +2501,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2542,14 +2542,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument infolog
GLMessage_DataType *arg_infolog = glmsg.add_args();
arg_infolog->set_isarray(false);
- arg_infolog->set_type(GLMessage::DataType::INT);
- arg_infolog->add_intvalue((int)infolog);
+ arg_infolog->set_type(GLMessage::DataType::INT64);
+ arg_infolog->add_int64value((uintptr_t)infolog);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2590,8 +2590,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2631,8 +2631,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2672,14 +2672,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument infolog
GLMessage_DataType *arg_infolog = glmsg.add_args();
arg_infolog->set_isarray(false);
- arg_infolog->set_type(GLMessage::DataType::INT);
- arg_infolog->add_intvalue((int)infolog);
+ arg_infolog->set_type(GLMessage::DataType::INT64);
+ arg_infolog->add_int64value((uintptr_t)infolog);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2720,14 +2720,14 @@
// copy argument range
GLMessage_DataType *arg_range = glmsg.add_args();
arg_range->set_isarray(false);
- arg_range->set_type(GLMessage::DataType::INT);
- arg_range->add_intvalue((int)range);
+ arg_range->set_type(GLMessage::DataType::INT64);
+ arg_range->add_int64value((uintptr_t)range);
// copy argument precision
GLMessage_DataType *arg_precision = glmsg.add_args();
arg_precision->set_isarray(false);
- arg_precision->set_type(GLMessage::DataType::INT);
- arg_precision->add_intvalue((int)precision);
+ arg_precision->set_type(GLMessage::DataType::INT64);
+ arg_precision->add_int64value((uintptr_t)precision);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2768,14 +2768,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument source
GLMessage_DataType *arg_source = glmsg.add_args();
arg_source->set_isarray(false);
- arg_source->set_type(GLMessage::DataType::INT);
- arg_source->add_intvalue((int)source);
+ arg_source->set_type(GLMessage::DataType::INT64);
+ arg_source->add_int64value((uintptr_t)source);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2817,8 +2817,8 @@
// set return value
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
+ rt->set_type(GLMessage::DataType::INT64);
+ rt->add_int64value((uintptr_t)retValue);
void *pointerArgs[] = {
(void *) retValue,
@@ -2853,8 +2853,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2894,8 +2894,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2935,8 +2935,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2976,8 +2976,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3011,8 +3011,8 @@
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3060,8 +3060,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3101,8 +3101,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3142,8 +3142,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3617,8 +3617,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3800,8 +3800,8 @@
// copy argument shaders
GLMessage_DataType *arg_shaders = glmsg.add_args();
arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
+ arg_shaders->set_type(GLMessage::DataType::INT64);
+ arg_shaders->add_int64value((uintptr_t)shaders);
// copy argument binaryformat
GLMessage_DataType *arg_binaryformat = glmsg.add_args();
@@ -3812,8 +3812,8 @@
// copy argument binary
GLMessage_DataType *arg_binary = glmsg.add_args();
arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
+ arg_binary->set_type(GLMessage::DataType::INT64);
+ arg_binary->add_int64value((uintptr_t)binary);
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
@@ -3860,14 +3860,14 @@
// copy argument string
GLMessage_DataType *arg_string = glmsg.add_args();
arg_string->set_isarray(false);
- arg_string->set_type(GLMessage::DataType::INT);
- arg_string->add_intvalue((int)string);
+ arg_string->set_type(GLMessage::DataType::INT64);
+ arg_string->add_int64value((uintptr_t)string);
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4178,8 +4178,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4259,8 +4259,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4340,8 +4340,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4417,8 +4417,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4492,8 +4492,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4567,8 +4567,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4648,8 +4648,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4729,8 +4729,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4816,8 +4816,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4903,8 +4903,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4996,8 +4996,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5089,8 +5089,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5136,8 +5136,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5183,8 +5183,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5230,8 +5230,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5355,8 +5355,8 @@
// copy argument values
GLMessage_DataType *arg_values = glmsg.add_args();
arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
+ arg_values->set_type(GLMessage::DataType::INT64);
+ arg_values->add_int64value((uintptr_t)values);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5430,8 +5430,8 @@
// copy argument values
GLMessage_DataType *arg_values = glmsg.add_args();
arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
+ arg_values->set_type(GLMessage::DataType::INT64);
+ arg_values->add_int64value((uintptr_t)values);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5511,8 +5511,8 @@
// copy argument values
GLMessage_DataType *arg_values = glmsg.add_args();
arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
+ arg_values->set_type(GLMessage::DataType::INT64);
+ arg_values->add_int64value((uintptr_t)values);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5598,8 +5598,8 @@
// copy argument values
GLMessage_DataType *arg_values = glmsg.add_args();
arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
+ arg_values->set_type(GLMessage::DataType::INT64);
+ arg_values->add_int64value((uintptr_t)values);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5657,8 +5657,8 @@
// copy argument ptr
GLMessage_DataType *arg_ptr = glmsg.add_args();
arg_ptr->set_isarray(false);
- arg_ptr->set_type(GLMessage::DataType::INT);
- arg_ptr->add_intvalue((int)ptr);
+ arg_ptr->set_type(GLMessage::DataType::INT64);
+ arg_ptr->add_int64value((uintptr_t)ptr);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5790,8 +5790,8 @@
// copy argument indices
GLMessage_DataType *arg_indices = glmsg.add_args();
arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
+ arg_indices->set_type(GLMessage::DataType::INT64);
+ arg_indices->add_int64value((uintptr_t)indices);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5873,8 +5873,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5962,8 +5962,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6115,8 +6115,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6204,8 +6204,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6239,8 +6239,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6274,8 +6274,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6413,8 +6413,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6454,8 +6454,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6531,8 +6531,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6566,8 +6566,8 @@
// copy argument bufs
GLMessage_DataType *arg_bufs = glmsg.add_args();
arg_bufs->set_isarray(false);
- arg_bufs->set_type(GLMessage::DataType::INT);
- arg_bufs->add_intvalue((int)bufs);
+ arg_bufs->set_type(GLMessage::DataType::INT64);
+ arg_bufs->add_int64value((uintptr_t)bufs);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6613,8 +6613,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6660,8 +6660,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6707,8 +6707,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6754,8 +6754,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6801,8 +6801,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6848,8 +6848,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7094,8 +7094,8 @@
// set return value
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
+ rt->set_type(GLMessage::DataType::INT64);
+ rt->add_int64value((uintptr_t)retValue);
void *pointerArgs[] = {
(void *) retValue,
@@ -7192,8 +7192,8 @@
// copy argument arrays
GLMessage_DataType *arg_arrays = glmsg.add_args();
arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
+ arg_arrays->set_type(GLMessage::DataType::INT64);
+ arg_arrays->add_int64value((uintptr_t)arrays);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7227,8 +7227,8 @@
// copy argument arrays
GLMessage_DataType *arg_arrays = glmsg.add_args();
arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
+ arg_arrays->set_type(GLMessage::DataType::INT64);
+ arg_arrays->add_int64value((uintptr_t)arrays);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7304,8 +7304,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7487,8 +7487,8 @@
// copy argument varyings
GLMessage_DataType *arg_varyings = glmsg.add_args();
arg_varyings->set_isarray(false);
- arg_varyings->set_type(GLMessage::DataType::INT);
- arg_varyings->add_intvalue((int)varyings);
+ arg_varyings->set_type(GLMessage::DataType::INT64);
+ arg_varyings->add_int64value((uintptr_t)varyings);
// copy argument bufferMode
GLMessage_DataType *arg_bufferMode = glmsg.add_args();
@@ -7540,26 +7540,26 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument size
GLMessage_DataType *arg_size = glmsg.add_args();
arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
+ arg_size->set_type(GLMessage::DataType::INT64);
+ arg_size->add_int64value((uintptr_t)size);
// copy argument type
GLMessage_DataType *arg_type = glmsg.add_args();
arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::INT);
- arg_type->add_intvalue((int)type);
+ arg_type->set_type(GLMessage::DataType::INT64);
+ arg_type->add_int64value((uintptr_t)type);
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7614,8 +7614,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7655,8 +7655,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7696,8 +7696,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7835,8 +7835,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7870,8 +7870,8 @@
// copy argument v
GLMessage_DataType *arg_v = glmsg.add_args();
arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
+ arg_v->set_type(GLMessage::DataType::INT64);
+ arg_v->add_int64value((uintptr_t)v);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7911,8 +7911,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7946,8 +7946,8 @@
// copy argument name
GLMessage_DataType *arg_name = glmsg.add_args();
arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
+ arg_name->set_type(GLMessage::DataType::INT64);
+ arg_name->add_int64value((uintptr_t)name);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8167,8 +8167,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8208,8 +8208,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8249,8 +8249,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8290,8 +8290,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8331,8 +8331,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8372,8 +8372,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8413,8 +8413,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8507,8 +8507,8 @@
// set return value
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
+ rt->set_type(GLMessage::DataType::INT64);
+ rt->add_int64value((uintptr_t)retValue);
void *pointerArgs[] = {
(void *) retValue,
@@ -8595,14 +8595,14 @@
// copy argument uniformNames
GLMessage_DataType *arg_uniformNames = glmsg.add_args();
arg_uniformNames->set_isarray(false);
- arg_uniformNames->set_type(GLMessage::DataType::INT);
- arg_uniformNames->add_intvalue((int)uniformNames);
+ arg_uniformNames->set_type(GLMessage::DataType::INT64);
+ arg_uniformNames->add_int64value((uintptr_t)uniformNames);
// copy argument uniformIndices
GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
arg_uniformIndices->set_isarray(false);
- arg_uniformIndices->set_type(GLMessage::DataType::INT);
- arg_uniformIndices->add_intvalue((int)uniformIndices);
+ arg_uniformIndices->set_type(GLMessage::DataType::INT64);
+ arg_uniformIndices->add_int64value((uintptr_t)uniformIndices);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8643,8 +8643,8 @@
// copy argument uniformIndices
GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
arg_uniformIndices->set_isarray(false);
- arg_uniformIndices->set_type(GLMessage::DataType::INT);
- arg_uniformIndices->add_intvalue((int)uniformIndices);
+ arg_uniformIndices->set_type(GLMessage::DataType::INT64);
+ arg_uniformIndices->add_int64value((uintptr_t)uniformIndices);
// copy argument pname
GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -8655,8 +8655,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8691,8 +8691,8 @@
// copy argument uniformBlockName
GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
arg_uniformBlockName->set_isarray(false);
- arg_uniformBlockName->set_type(GLMessage::DataType::INT);
- arg_uniformBlockName->add_intvalue((int)uniformBlockName);
+ arg_uniformBlockName->set_type(GLMessage::DataType::INT64);
+ arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8746,8 +8746,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8793,14 +8793,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument uniformBlockName
GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
arg_uniformBlockName->set_isarray(false);
- arg_uniformBlockName->set_type(GLMessage::DataType::INT);
- arg_uniformBlockName->add_intvalue((int)uniformBlockName);
+ arg_uniformBlockName->set_type(GLMessage::DataType::INT64);
+ arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8933,8 +8933,8 @@
// copy argument indices
GLMessage_DataType *arg_indices = glmsg.add_args();
arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
+ arg_indices->set_type(GLMessage::DataType::INT64);
+ arg_indices->add_int64value((uintptr_t)indices);
// copy argument instanceCount
GLMessage_DataType *arg_instanceCount = glmsg.add_args();
@@ -8987,8 +8987,8 @@
// set return value
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
+ rt->set_type(GLMessage::DataType::INT64);
+ rt->add_int64value((uintptr_t)retValue);
void *pointerArgs[] = {
(void *) retValue,
@@ -9011,8 +9011,8 @@
// copy argument sync
GLMessage_DataType *arg_sync = glmsg.add_args();
arg_sync->set_isarray(false);
- arg_sync->set_type(GLMessage::DataType::INT);
- arg_sync->add_intvalue((int)sync);
+ arg_sync->set_type(GLMessage::DataType::INT64);
+ arg_sync->add_int64value((uintptr_t)sync);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9048,8 +9048,8 @@
// copy argument sync
GLMessage_DataType *arg_sync = glmsg.add_args();
arg_sync->set_isarray(false);
- arg_sync->set_type(GLMessage::DataType::INT);
- arg_sync->add_intvalue((int)sync);
+ arg_sync->set_type(GLMessage::DataType::INT64);
+ arg_sync->add_int64value((uintptr_t)sync);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9077,8 +9077,8 @@
// copy argument sync
GLMessage_DataType *arg_sync = glmsg.add_args();
arg_sync->set_isarray(false);
- arg_sync->set_type(GLMessage::DataType::INT);
- arg_sync->add_intvalue((int)sync);
+ arg_sync->set_type(GLMessage::DataType::INT64);
+ arg_sync->add_int64value((uintptr_t)sync);
// copy argument flags
GLMessage_DataType *arg_flags = glmsg.add_args();
@@ -9126,8 +9126,8 @@
// copy argument sync
GLMessage_DataType *arg_sync = glmsg.add_args();
arg_sync->set_isarray(false);
- arg_sync->set_type(GLMessage::DataType::INT);
- arg_sync->add_intvalue((int)sync);
+ arg_sync->set_type(GLMessage::DataType::INT64);
+ arg_sync->add_int64value((uintptr_t)sync);
// copy argument flags
GLMessage_DataType *arg_flags = glmsg.add_args();
@@ -9173,8 +9173,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9202,8 +9202,8 @@
// copy argument sync
GLMessage_DataType *arg_sync = glmsg.add_args();
arg_sync->set_isarray(false);
- arg_sync->set_type(GLMessage::DataType::INT);
- arg_sync->add_intvalue((int)sync);
+ arg_sync->set_type(GLMessage::DataType::INT64);
+ arg_sync->add_int64value((uintptr_t)sync);
// copy argument pname
GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -9220,14 +9220,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument values
GLMessage_DataType *arg_values = glmsg.add_args();
arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
+ arg_values->set_type(GLMessage::DataType::INT64);
+ arg_values->add_int64value((uintptr_t)values);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9269,8 +9269,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9310,8 +9310,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9345,8 +9345,8 @@
// copy argument samplers
GLMessage_DataType *arg_samplers = glmsg.add_args();
arg_samplers->set_isarray(false);
- arg_samplers->set_type(GLMessage::DataType::INT);
- arg_samplers->add_intvalue((int)samplers);
+ arg_samplers->set_type(GLMessage::DataType::INT64);
+ arg_samplers->add_int64value((uintptr_t)samplers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9380,8 +9380,8 @@
// copy argument samplers
GLMessage_DataType *arg_samplers = glmsg.add_args();
arg_samplers->set_isarray(false);
- arg_samplers->set_type(GLMessage::DataType::INT);
- arg_samplers->add_intvalue((int)samplers);
+ arg_samplers->set_type(GLMessage::DataType::INT64);
+ arg_samplers->add_int64value((uintptr_t)samplers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9531,8 +9531,8 @@
// copy argument param
GLMessage_DataType *arg_param = glmsg.add_args();
arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue((int)param);
+ arg_param->set_type(GLMessage::DataType::INT64);
+ arg_param->add_int64value((uintptr_t)param);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9612,8 +9612,8 @@
// copy argument param
GLMessage_DataType *arg_param = glmsg.add_args();
arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue((int)param);
+ arg_param->set_type(GLMessage::DataType::INT64);
+ arg_param->add_int64value((uintptr_t)param);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9653,8 +9653,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9694,8 +9694,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9797,8 +9797,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9832,8 +9832,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9953,20 +9953,20 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument binaryFormat
GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
arg_binaryFormat->set_isarray(false);
- arg_binaryFormat->set_type(GLMessage::DataType::INT);
- arg_binaryFormat->add_intvalue((int)binaryFormat);
+ arg_binaryFormat->set_type(GLMessage::DataType::INT64);
+ arg_binaryFormat->add_int64value((uintptr_t)binaryFormat);
// copy argument binary
GLMessage_DataType *arg_binary = glmsg.add_args();
arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
+ arg_binary->set_type(GLMessage::DataType::INT64);
+ arg_binary->add_int64value((uintptr_t)binary);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10008,8 +10008,8 @@
// copy argument binary
GLMessage_DataType *arg_binary = glmsg.add_args();
arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
+ arg_binary->set_type(GLMessage::DataType::INT64);
+ arg_binary->add_int64value((uintptr_t)binary);
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
@@ -10095,8 +10095,8 @@
// copy argument attachments
GLMessage_DataType *arg_attachments = glmsg.add_args();
arg_attachments->set_isarray(false);
- arg_attachments->set_type(GLMessage::DataType::INT);
- arg_attachments->add_intvalue((int)attachments);
+ arg_attachments->set_type(GLMessage::DataType::INT64);
+ arg_attachments->add_int64value((uintptr_t)attachments);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10136,8 +10136,8 @@
// copy argument attachments
GLMessage_DataType *arg_attachments = glmsg.add_args();
arg_attachments->set_isarray(false);
- arg_attachments->set_type(GLMessage::DataType::INT);
- arg_attachments->add_intvalue((int)attachments);
+ arg_attachments->set_type(GLMessage::DataType::INT64);
+ arg_attachments->add_int64value((uintptr_t)attachments);
// copy argument x
GLMessage_DataType *arg_x = glmsg.add_args();
@@ -10323,8 +10323,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10361,8 +10361,8 @@
// copy argument image
GLMessage_DataType *arg_image = glmsg.add_args();
arg_image->set_isarray(false);
- arg_image->set_type(GLMessage::DataType::INT);
- arg_image->add_intvalue((int)image);
+ arg_image->set_type(GLMessage::DataType::INT64);
+ arg_image->add_int64value((uintptr_t)image);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10396,8 +10396,8 @@
// copy argument image
GLMessage_DataType *arg_image = glmsg.add_args();
arg_image->set_isarray(false);
- arg_image->set_type(GLMessage::DataType::INT);
- arg_image->add_intvalue((int)image);
+ arg_image->set_type(GLMessage::DataType::INT64);
+ arg_image->add_int64value((uintptr_t)image);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10437,20 +10437,20 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument binaryFormat
GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
arg_binaryFormat->set_isarray(false);
- arg_binaryFormat->set_type(GLMessage::DataType::INT);
- arg_binaryFormat->add_intvalue((int)binaryFormat);
+ arg_binaryFormat->set_type(GLMessage::DataType::INT64);
+ arg_binaryFormat->add_int64value((uintptr_t)binaryFormat);
// copy argument binary
GLMessage_DataType *arg_binary = glmsg.add_args();
arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
+ arg_binary->set_type(GLMessage::DataType::INT64);
+ arg_binary->add_int64value((uintptr_t)binary);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10492,8 +10492,8 @@
// copy argument binary
GLMessage_DataType *arg_binary = glmsg.add_args();
arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
+ arg_binary->set_type(GLMessage::DataType::INT64);
+ arg_binary->add_int64value((uintptr_t)binary);
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
@@ -10546,8 +10546,8 @@
// set return value
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
+ rt->set_type(GLMessage::DataType::INT64);
+ rt->add_int64value((uintptr_t)retValue);
void *pointerArgs[] = {
(void *) retValue,
@@ -10618,8 +10618,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10701,8 +10701,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10790,8 +10790,8 @@
// copy argument pixels
GLMessage_DataType *arg_pixels = glmsg.add_args();
arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
+ arg_pixels->set_type(GLMessage::DataType::INT64);
+ arg_pixels->add_int64value((uintptr_t)pixels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10943,8 +10943,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11032,8 +11032,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11153,8 +11153,8 @@
// copy argument arrays
GLMessage_DataType *arg_arrays = glmsg.add_args();
arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
+ arg_arrays->set_type(GLMessage::DataType::INT64);
+ arg_arrays->add_int64value((uintptr_t)arrays);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11188,8 +11188,8 @@
// copy argument arrays
GLMessage_DataType *arg_arrays = glmsg.add_args();
arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
+ arg_arrays->set_type(GLMessage::DataType::INT64);
+ arg_arrays->add_int64value((uintptr_t)arrays);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11253,8 +11253,8 @@
// copy argument numGroups
GLMessage_DataType *arg_numGroups = glmsg.add_args();
arg_numGroups->set_isarray(false);
- arg_numGroups->set_type(GLMessage::DataType::INT);
- arg_numGroups->add_intvalue((int)numGroups);
+ arg_numGroups->set_type(GLMessage::DataType::INT64);
+ arg_numGroups->add_int64value((uintptr_t)numGroups);
// copy argument groupsSize
GLMessage_DataType *arg_groupsSize = glmsg.add_args();
@@ -11265,8 +11265,8 @@
// copy argument groups
GLMessage_DataType *arg_groups = glmsg.add_args();
arg_groups->set_isarray(false);
- arg_groups->set_type(GLMessage::DataType::INT);
- arg_groups->add_intvalue((int)groups);
+ arg_groups->set_type(GLMessage::DataType::INT64);
+ arg_groups->add_int64value((uintptr_t)groups);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11301,14 +11301,14 @@
// copy argument numCounters
GLMessage_DataType *arg_numCounters = glmsg.add_args();
arg_numCounters->set_isarray(false);
- arg_numCounters->set_type(GLMessage::DataType::INT);
- arg_numCounters->add_intvalue((int)numCounters);
+ arg_numCounters->set_type(GLMessage::DataType::INT64);
+ arg_numCounters->add_int64value((uintptr_t)numCounters);
// copy argument maxActiveCounters
GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
arg_maxActiveCounters->set_isarray(false);
- arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
- arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
+ arg_maxActiveCounters->set_type(GLMessage::DataType::INT64);
+ arg_maxActiveCounters->add_int64value((uintptr_t)maxActiveCounters);
// copy argument counterSize
GLMessage_DataType *arg_counterSize = glmsg.add_args();
@@ -11319,8 +11319,8 @@
// copy argument counters
GLMessage_DataType *arg_counters = glmsg.add_args();
arg_counters->set_isarray(false);
- arg_counters->set_type(GLMessage::DataType::INT);
- arg_counters->add_intvalue((int)counters);
+ arg_counters->set_type(GLMessage::DataType::INT64);
+ arg_counters->add_int64value((uintptr_t)counters);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11362,14 +11362,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument groupString
GLMessage_DataType *arg_groupString = glmsg.add_args();
arg_groupString->set_isarray(false);
- arg_groupString->set_type(GLMessage::DataType::INT);
- arg_groupString->add_intvalue((int)groupString);
+ arg_groupString->set_type(GLMessage::DataType::INT64);
+ arg_groupString->add_int64value((uintptr_t)groupString);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11416,14 +11416,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument counterString
GLMessage_DataType *arg_counterString = glmsg.add_args();
arg_counterString->set_isarray(false);
- arg_counterString->set_type(GLMessage::DataType::INT);
- arg_counterString->add_intvalue((int)counterString);
+ arg_counterString->set_type(GLMessage::DataType::INT64);
+ arg_counterString->add_int64value((uintptr_t)counterString);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11470,8 +11470,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11505,8 +11505,8 @@
// copy argument monitors
GLMessage_DataType *arg_monitors = glmsg.add_args();
arg_monitors->set_isarray(false);
- arg_monitors->set_type(GLMessage::DataType::INT);
- arg_monitors->add_intvalue((int)monitors);
+ arg_monitors->set_type(GLMessage::DataType::INT64);
+ arg_monitors->add_int64value((uintptr_t)monitors);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11540,8 +11540,8 @@
// copy argument monitors
GLMessage_DataType *arg_monitors = glmsg.add_args();
arg_monitors->set_isarray(false);
- arg_monitors->set_type(GLMessage::DataType::INT);
- arg_monitors->add_intvalue((int)monitors);
+ arg_monitors->set_type(GLMessage::DataType::INT64);
+ arg_monitors->add_int64value((uintptr_t)monitors);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11593,8 +11593,8 @@
// copy argument countersList
GLMessage_DataType *arg_countersList = glmsg.add_args();
arg_countersList->set_isarray(false);
- arg_countersList->set_type(GLMessage::DataType::INT);
- arg_countersList->add_intvalue((int)countersList);
+ arg_countersList->set_type(GLMessage::DataType::INT64);
+ arg_countersList->add_int64value((uintptr_t)countersList);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11696,14 +11696,14 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// copy argument bytesWritten
GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
arg_bytesWritten->set_isarray(false);
- arg_bytesWritten->set_type(GLMessage::DataType::INT);
- arg_bytesWritten->add_intvalue((int)bytesWritten);
+ arg_bytesWritten->set_type(GLMessage::DataType::INT64);
+ arg_bytesWritten->add_int64value((uintptr_t)bytesWritten);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11958,8 +11958,8 @@
// copy argument label
GLMessage_DataType *arg_label = glmsg.add_args();
arg_label->set_isarray(false);
- arg_label->set_type(GLMessage::DataType::INT);
- arg_label->add_intvalue((int)label);
+ arg_label->set_type(GLMessage::DataType::INT64);
+ arg_label->add_int64value((uintptr_t)label);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12005,14 +12005,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument label
GLMessage_DataType *arg_label = glmsg.add_args();
arg_label->set_isarray(false);
- arg_label->set_type(GLMessage::DataType::INT);
- arg_label->add_intvalue((int)label);
+ arg_label->set_type(GLMessage::DataType::INT64);
+ arg_label->add_int64value((uintptr_t)label);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12047,8 +12047,8 @@
// copy argument marker
GLMessage_DataType *arg_marker = glmsg.add_args();
arg_marker->set_isarray(false);
- arg_marker->set_type(GLMessage::DataType::INT);
- arg_marker->add_intvalue((int)marker);
+ arg_marker->set_type(GLMessage::DataType::INT64);
+ arg_marker->add_int64value((uintptr_t)marker);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12082,8 +12082,8 @@
// copy argument marker
GLMessage_DataType *arg_marker = glmsg.add_args();
arg_marker->set_isarray(false);
- arg_marker->set_type(GLMessage::DataType::INT);
- arg_marker->add_intvalue((int)marker);
+ arg_marker->set_type(GLMessage::DataType::INT64);
+ arg_marker->add_int64value((uintptr_t)marker);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12145,8 +12145,8 @@
// copy argument attachments
GLMessage_DataType *arg_attachments = glmsg.add_args();
arg_attachments->set_isarray(false);
- arg_attachments->set_type(GLMessage::DataType::INT);
- arg_attachments->add_intvalue((int)attachments);
+ arg_attachments->set_type(GLMessage::DataType::INT64);
+ arg_attachments->add_int64value((uintptr_t)attachments);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12290,14 +12290,14 @@
// copy argument first
GLMessage_DataType *arg_first = glmsg.add_args();
arg_first->set_isarray(false);
- arg_first->set_type(GLMessage::DataType::INT);
- arg_first->add_intvalue((int)first);
+ arg_first->set_type(GLMessage::DataType::INT64);
+ arg_first->add_int64value((uintptr_t)first);
// copy argument count
GLMessage_DataType *arg_count = glmsg.add_args();
arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
+ arg_count->set_type(GLMessage::DataType::INT64);
+ arg_count->add_int64value((uintptr_t)count);
// copy argument primcount
GLMessage_DataType *arg_primcount = glmsg.add_args();
@@ -12338,8 +12338,8 @@
// copy argument count
GLMessage_DataType *arg_count = glmsg.add_args();
arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
+ arg_count->set_type(GLMessage::DataType::INT64);
+ arg_count->add_int64value((uintptr_t)count);
// copy argument type
GLMessage_DataType *arg_type = glmsg.add_args();
@@ -12350,8 +12350,8 @@
// copy argument indices
GLMessage_DataType *arg_indices = glmsg.add_args();
arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
+ arg_indices->set_type(GLMessage::DataType::INT64);
+ arg_indices->add_int64value((uintptr_t)indices);
// copy argument primcount
GLMessage_DataType *arg_primcount = glmsg.add_args();
@@ -12392,8 +12392,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12427,8 +12427,8 @@
// copy argument ids
GLMessage_DataType *arg_ids = glmsg.add_args();
arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
+ arg_ids->set_type(GLMessage::DataType::INT64);
+ arg_ids->add_int64value((uintptr_t)ids);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12566,8 +12566,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12607,8 +12607,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12708,8 +12708,8 @@
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
+ arg_data->set_type(GLMessage::DataType::INT64);
+ arg_data->add_int64value((uintptr_t)data);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12755,8 +12755,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12802,8 +12802,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12917,8 +12917,8 @@
// copy argument strings
GLMessage_DataType *arg_strings = glmsg.add_args();
arg_strings->set_isarray(false);
- arg_strings->set_type(GLMessage::DataType::INT);
- arg_strings->add_intvalue((int)strings);
+ arg_strings->set_type(GLMessage::DataType::INT64);
+ arg_strings->add_int64value((uintptr_t)strings);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12988,8 +12988,8 @@
// copy argument pipelines
GLMessage_DataType *arg_pipelines = glmsg.add_args();
arg_pipelines->set_isarray(false);
- arg_pipelines->set_type(GLMessage::DataType::INT);
- arg_pipelines->add_intvalue((int)pipelines);
+ arg_pipelines->set_type(GLMessage::DataType::INT64);
+ arg_pipelines->add_int64value((uintptr_t)pipelines);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13023,8 +13023,8 @@
// copy argument pipelines
GLMessage_DataType *arg_pipelines = glmsg.add_args();
arg_pipelines->set_isarray(false);
- arg_pipelines->set_type(GLMessage::DataType::INT);
- arg_pipelines->add_intvalue((int)pipelines);
+ arg_pipelines->set_type(GLMessage::DataType::INT64);
+ arg_pipelines->add_int64value((uintptr_t)pipelines);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13140,8 +13140,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13579,8 +13579,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13626,8 +13626,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13673,8 +13673,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13720,8 +13720,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13767,8 +13767,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13814,8 +13814,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13861,8 +13861,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13908,8 +13908,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13961,8 +13961,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14014,8 +14014,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14067,8 +14067,8 @@
// copy argument value
GLMessage_DataType *arg_value = glmsg.add_args();
arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
+ arg_value->set_type(GLMessage::DataType::INT64);
+ arg_value->add_int64value((uintptr_t)value);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14136,14 +14136,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument infoLog
GLMessage_DataType *arg_infoLog = glmsg.add_args();
arg_infoLog->set_isarray(false);
- arg_infoLog->set_type(GLMessage::DataType::INT);
- arg_infoLog->add_intvalue((int)infoLog);
+ arg_infoLog->set_type(GLMessage::DataType::INT64);
+ arg_infoLog->add_int64value((uintptr_t)infoLog);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14674,8 +14674,8 @@
// copy argument bufs
GLMessage_DataType *arg_bufs = glmsg.add_args();
arg_bufs->set_isarray(false);
- arg_bufs->set_type(GLMessage::DataType::INT);
- arg_bufs->add_intvalue((int)bufs);
+ arg_bufs->set_type(GLMessage::DataType::INT64);
+ arg_bufs->add_int64value((uintptr_t)bufs);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14709,8 +14709,8 @@
// copy argument fences
GLMessage_DataType *arg_fences = glmsg.add_args();
arg_fences->set_isarray(false);
- arg_fences->set_type(GLMessage::DataType::INT);
- arg_fences->add_intvalue((int)fences);
+ arg_fences->set_type(GLMessage::DataType::INT64);
+ arg_fences->add_int64value((uintptr_t)fences);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14744,8 +14744,8 @@
// copy argument fences
GLMessage_DataType *arg_fences = glmsg.add_args();
arg_fences->set_isarray(false);
- arg_fences->set_type(GLMessage::DataType::INT);
- arg_fences->add_intvalue((int)fences);
+ arg_fences->set_type(GLMessage::DataType::INT64);
+ arg_fences->add_int64value((uintptr_t)fences);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14857,8 +14857,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15010,8 +15010,8 @@
// copy argument num
GLMessage_DataType *arg_num = glmsg.add_args();
arg_num->set_isarray(false);
- arg_num->set_type(GLMessage::DataType::INT);
- arg_num->add_intvalue((int)num);
+ arg_num->set_type(GLMessage::DataType::INT64);
+ arg_num->add_int64value((uintptr_t)num);
// copy argument size
GLMessage_DataType *arg_size = glmsg.add_args();
@@ -15022,8 +15022,8 @@
// copy argument driverControls
GLMessage_DataType *arg_driverControls = glmsg.add_args();
arg_driverControls->set_isarray(false);
- arg_driverControls->set_type(GLMessage::DataType::INT);
- arg_driverControls->add_intvalue((int)driverControls);
+ arg_driverControls->set_type(GLMessage::DataType::INT64);
+ arg_driverControls->add_int64value((uintptr_t)driverControls);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15064,14 +15064,14 @@
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// copy argument driverControlString
GLMessage_DataType *arg_driverControlString = glmsg.add_args();
arg_driverControlString->set_isarray(false);
- arg_driverControlString->set_type(GLMessage::DataType::INT);
- arg_driverControlString->add_intvalue((int)driverControlString);
+ arg_driverControlString->set_type(GLMessage::DataType::INT64);
+ arg_driverControlString->add_int64value((uintptr_t)driverControlString);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15156,8 +15156,8 @@
// copy argument textures
GLMessage_DataType *arg_textures = glmsg.add_args();
arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
+ arg_textures->set_type(GLMessage::DataType::INT64);
+ arg_textures->add_int64value((uintptr_t)textures);
// copy argument maxTextures
GLMessage_DataType *arg_maxTextures = glmsg.add_args();
@@ -15168,8 +15168,8 @@
// copy argument numTextures
GLMessage_DataType *arg_numTextures = glmsg.add_args();
arg_numTextures->set_isarray(false);
- arg_numTextures->set_type(GLMessage::DataType::INT);
- arg_numTextures->add_intvalue((int)numTextures);
+ arg_numTextures->set_type(GLMessage::DataType::INT64);
+ arg_numTextures->add_int64value((uintptr_t)numTextures);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15198,8 +15198,8 @@
// copy argument buffers
GLMessage_DataType *arg_buffers = glmsg.add_args();
arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
+ arg_buffers->set_type(GLMessage::DataType::INT64);
+ arg_buffers->add_int64value((uintptr_t)buffers);
// copy argument maxBuffers
GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
@@ -15210,8 +15210,8 @@
// copy argument numBuffers
GLMessage_DataType *arg_numBuffers = glmsg.add_args();
arg_numBuffers->set_isarray(false);
- arg_numBuffers->set_type(GLMessage::DataType::INT);
- arg_numBuffers->add_intvalue((int)numBuffers);
+ arg_numBuffers->set_type(GLMessage::DataType::INT64);
+ arg_numBuffers->add_int64value((uintptr_t)numBuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15240,8 +15240,8 @@
// copy argument renderbuffers
GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
// copy argument maxRenderbuffers
GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
@@ -15252,8 +15252,8 @@
// copy argument numRenderbuffers
GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
arg_numRenderbuffers->set_isarray(false);
- arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
- arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
+ arg_numRenderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_numRenderbuffers->add_int64value((uintptr_t)numRenderbuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15282,8 +15282,8 @@
// copy argument framebuffers
GLMessage_DataType *arg_framebuffers = glmsg.add_args();
arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
+ arg_framebuffers->set_type(GLMessage::DataType::INT64);
+ arg_framebuffers->add_int64value((uintptr_t)framebuffers);
// copy argument maxFramebuffers
GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
@@ -15294,8 +15294,8 @@
// copy argument numFramebuffers
GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
arg_numFramebuffers->set_isarray(false);
- arg_numFramebuffers->set_type(GLMessage::DataType::INT);
- arg_numFramebuffers->add_intvalue((int)numFramebuffers);
+ arg_numFramebuffers->set_type(GLMessage::DataType::INT64);
+ arg_numFramebuffers->add_int64value((uintptr_t)numFramebuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15348,8 +15348,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15477,8 +15477,8 @@
// copy argument texels
GLMessage_DataType *arg_texels = glmsg.add_args();
arg_texels->set_isarray(false);
- arg_texels->set_type(GLMessage::DataType::INT);
- arg_texels->add_intvalue((int)texels);
+ arg_texels->set_type(GLMessage::DataType::INT64);
+ arg_texels->add_int64value((uintptr_t)texels);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15512,8 +15512,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15541,8 +15541,8 @@
// copy argument shaders
GLMessage_DataType *arg_shaders = glmsg.add_args();
arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
+ arg_shaders->set_type(GLMessage::DataType::INT64);
+ arg_shaders->add_int64value((uintptr_t)shaders);
// copy argument maxShaders
GLMessage_DataType *arg_maxShaders = glmsg.add_args();
@@ -15553,8 +15553,8 @@
// copy argument numShaders
GLMessage_DataType *arg_numShaders = glmsg.add_args();
arg_numShaders->set_isarray(false);
- arg_numShaders->set_type(GLMessage::DataType::INT);
- arg_numShaders->add_intvalue((int)numShaders);
+ arg_numShaders->set_type(GLMessage::DataType::INT64);
+ arg_numShaders->add_int64value((uintptr_t)numShaders);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15583,8 +15583,8 @@
// copy argument programs
GLMessage_DataType *arg_programs = glmsg.add_args();
arg_programs->set_isarray(false);
- arg_programs->set_type(GLMessage::DataType::INT);
- arg_programs->add_intvalue((int)programs);
+ arg_programs->set_type(GLMessage::DataType::INT64);
+ arg_programs->add_int64value((uintptr_t)programs);
// copy argument maxPrograms
GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
@@ -15595,8 +15595,8 @@
// copy argument numPrograms
GLMessage_DataType *arg_numPrograms = glmsg.add_args();
arg_numPrograms->set_isarray(false);
- arg_numPrograms->set_type(GLMessage::DataType::INT);
- arg_numPrograms->add_intvalue((int)numPrograms);
+ arg_numPrograms->set_type(GLMessage::DataType::INT64);
+ arg_numPrograms->add_int64value((uintptr_t)numPrograms);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15673,14 +15673,14 @@
// copy argument source
GLMessage_DataType *arg_source = glmsg.add_args();
arg_source->set_isarray(false);
- arg_source->set_type(GLMessage::DataType::INT);
- arg_source->add_intvalue((int)source);
+ arg_source->set_type(GLMessage::DataType::INT64);
+ arg_source->add_int64value((uintptr_t)source);
// copy argument length
GLMessage_DataType *arg_length = glmsg.add_args();
arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
+ arg_length->set_type(GLMessage::DataType::INT64);
+ arg_length->add_int64value((uintptr_t)length);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15832,8 +15832,8 @@
// copy argument equation
GLMessage_DataType *arg_equation = glmsg.add_args();
arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
+ arg_equation->set_type(GLMessage::DataType::INT64);
+ arg_equation->add_int64value((uintptr_t)equation);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15947,8 +15947,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16040,8 +16040,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16081,8 +16081,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16122,8 +16122,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16163,8 +16163,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16232,8 +16232,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16313,8 +16313,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16342,8 +16342,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16423,8 +16423,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16452,8 +16452,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16671,8 +16671,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16866,8 +16866,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17077,8 +17077,8 @@
// copy argument equation
GLMessage_DataType *arg_equation = glmsg.add_args();
arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
+ arg_equation->set_type(GLMessage::DataType::INT64);
+ arg_equation->add_int64value((uintptr_t)equation);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17216,8 +17216,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17375,8 +17375,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17468,8 +17468,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17503,8 +17503,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17544,8 +17544,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17585,8 +17585,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17620,8 +17620,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17661,8 +17661,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17702,8 +17702,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17743,8 +17743,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17812,8 +17812,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17893,8 +17893,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17972,8 +17972,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18081,8 +18081,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18138,8 +18138,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18271,8 +18271,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18398,8 +18398,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18699,8 +18699,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18820,8 +18820,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18861,8 +18861,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18942,8 +18942,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19029,8 +19029,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19070,8 +19070,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19366,8 +19366,8 @@
// copy argument coords
GLMessage_DataType *arg_coords = glmsg.add_args();
arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
+ arg_coords->set_type(GLMessage::DataType::INT64);
+ arg_coords->add_int64value((uintptr_t)coords);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19395,8 +19395,8 @@
// copy argument coords
GLMessage_DataType *arg_coords = glmsg.add_args();
arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
+ arg_coords->set_type(GLMessage::DataType::INT64);
+ arg_coords->add_int64value((uintptr_t)coords);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19424,8 +19424,8 @@
// copy argument coords
GLMessage_DataType *arg_coords = glmsg.add_args();
arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
+ arg_coords->set_type(GLMessage::DataType::INT64);
+ arg_coords->add_int64value((uintptr_t)coords);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19505,8 +19505,8 @@
// copy argument coords
GLMessage_DataType *arg_coords = glmsg.add_args();
arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
+ arg_coords->set_type(GLMessage::DataType::INT64);
+ arg_coords->add_int64value((uintptr_t)coords);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19648,8 +19648,8 @@
// copy argument equation
GLMessage_DataType *arg_equation = glmsg.add_args();
arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
+ arg_equation->set_type(GLMessage::DataType::INT64);
+ arg_equation->add_int64value((uintptr_t)equation);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19797,8 +19797,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19890,8 +19890,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19925,8 +19925,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19966,8 +19966,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20007,8 +20007,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20048,8 +20048,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20089,8 +20089,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20158,8 +20158,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20239,8 +20239,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20296,8 +20296,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20377,8 +20377,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20406,8 +20406,8 @@
// copy argument m
GLMessage_DataType *arg_m = glmsg.add_args();
arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
+ arg_m->set_type(GLMessage::DataType::INT64);
+ arg_m->add_int64value((uintptr_t)m);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20625,8 +20625,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20888,8 +20888,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20969,8 +20969,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21114,8 +21114,8 @@
// copy argument renderbuffers
GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21149,8 +21149,8 @@
// copy argument renderbuffers
GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+ arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21236,8 +21236,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21341,8 +21341,8 @@
// copy argument framebuffers
GLMessage_DataType *arg_framebuffers = glmsg.add_args();
arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
+ arg_framebuffers->set_type(GLMessage::DataType::INT64);
+ arg_framebuffers->add_int64value((uintptr_t)framebuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21376,8 +21376,8 @@
// copy argument framebuffers
GLMessage_DataType *arg_framebuffers = glmsg.add_args();
arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
+ arg_framebuffers->set_type(GLMessage::DataType::INT64);
+ arg_framebuffers->add_int64value((uintptr_t)framebuffers);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21557,8 +21557,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21682,8 +21682,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21729,8 +21729,8 @@
// copy argument pointer
GLMessage_DataType *arg_pointer = glmsg.add_args();
arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
+ arg_pointer->set_type(GLMessage::DataType::INT64);
+ arg_pointer->add_int64value((uintptr_t)pointer);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21758,14 +21758,14 @@
// copy argument mantissa
GLMessage_DataType *arg_mantissa = glmsg.add_args();
arg_mantissa->set_isarray(false);
- arg_mantissa->set_type(GLMessage::DataType::INT);
- arg_mantissa->add_intvalue((int)mantissa);
+ arg_mantissa->set_type(GLMessage::DataType::INT64);
+ arg_mantissa->add_int64value((uintptr_t)mantissa);
// copy argument exponent
GLMessage_DataType *arg_exponent = glmsg.add_args();
arg_exponent->set_isarray(false);
- arg_exponent->set_type(GLMessage::DataType::INT);
- arg_exponent->add_intvalue((int)exponent);
+ arg_exponent->set_type(GLMessage::DataType::INT64);
+ arg_exponent->add_int64value((uintptr_t)exponent);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21958,8 +21958,8 @@
// copy argument equation
GLMessage_DataType *arg_equation = glmsg.add_args();
arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
+ arg_equation->set_type(GLMessage::DataType::INT64);
+ arg_equation->add_int64value((uintptr_t)equation);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21993,8 +21993,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22102,8 +22102,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22183,8 +22183,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22264,8 +22264,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22305,8 +22305,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22346,8 +22346,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22387,8 +22387,8 @@
// copy argument params
GLMessage_DataType *arg_params = glmsg.add_args();
arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
+ arg_params->set_type(GLMessage::DataType::INT64);
+ arg_params->add_int64value((uintptr_t)params);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22422,8 +22422,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22457,8 +22457,8 @@
// copy argument eqn
GLMessage_DataType *arg_eqn = glmsg.add_args();
arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
+ arg_eqn->set_type(GLMessage::DataType::INT64);
+ arg_eqn->add_int64value((uintptr_t)eqn);
// call function
nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index 60686eb..76f7c78 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -25,9 +25,9 @@
# To generate C++ files, this script uses the 'pyratemp' template
# module. The only reason to use pyratemp is that it is extremly
# simple to install:
-# $ wget http://www.simple-is-better.org/template/pyratemp-current/pyratemp.py
-# Put the file in the GLES_trace/tools folder, or update PYTHONPATH
-# to point to wherever it was downloaded.
+# $ wget http://www.simple-is-better.org/template/pyratemp-0.3.2.tgz
+# Extract and put the pyratemp.py file in the GLES_trace/tools folder,
+# or update PYTHONPATH to point to wherever it was downloaded.
#
# USAGE
# $ cd GLES_trace - run the program from GLES2_trace folder
@@ -44,16 +44,18 @@
self.name = name
def __str__(self):
- if self.name == "pointer": # pointers map to the INT DataType
- return "INT"
+ if self.name == "pointer": # pointers map to the INT64 DataType
+ return "INT64"
return self.name.upper()
def getProtobufCall(self):
if self.name == "void":
raise ValueError("Attempt to set void value")
elif self.name == "char" or self.name == "byte" \
- or self.name == "pointer" or self.name == "enum":
+ or self.name == "enum":
return "add_intvalue((int)"
+ elif self.name == "pointer":
+ return "add_int64value((uintptr_t)"
elif self.name == "int":
return "add_intvalue("
elif self.name == "float":