summaryrefslogtreecommitdiff
path: root/libs/binder/OS.h
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-07-08 21:09:16 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-07-08 21:09:16 +0000
commitd4aa87c5c236b7c484ccf6ca8a5082db8cf23840 (patch)
tree57f6f0445b2fd330329cfef1e92bea3af9e2d85d /libs/binder/OS.h
parent29d5414928540044fbd5c007ff959bf8e92b7821 (diff)
parent7c0b79f00a17e0a284b519418655c539dc0f3940 (diff)
Merge changes I2703fb81,Ie95a70c2
* changes: libbinder: separate OS-specific code from Utils.cpp libbinder: mix and match binderRpcTest client and services
Diffstat (limited to 'libs/binder/OS.h')
-rw-r--r--libs/binder/OS.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libs/binder/OS.h b/libs/binder/OS.h
new file mode 100644
index 0000000000..e802e9cede
--- /dev/null
+++ b/libs/binder/OS.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+#pragma once
+
+#include <stddef.h>
+#include <cstdint>
+
+#include <android-base/result.h>
+#include <android-base/unique_fd.h>
+#include <utils/Errors.h>
+
+namespace android {
+
+android::base::Result<void> setNonBlocking(android::base::borrowed_fd fd);
+
+status_t getRandomBytes(uint8_t* data, size_t size);
+
+} // namespace android