3 * System.Native PAL internal calls (Android)
4 * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL)
5 * Copyright 2018 Microsoft
6 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
12 #include "pal_compiler.h"
13 #include "pal_config.h"
14 #include "pal_errno.h"
15 #include "pal_utilities.h"
17 #include "pal-android.h"
19 int32_t SystemNative_Read(intptr_t fd
, void* buffer
, int32_t bufferSize
)
21 assert(buffer
!= NULL
|| bufferSize
== 0);
22 assert(bufferSize
>= 0);
31 count
= read(ToFileDescriptor(fd
), buffer
, (uint32_t)bufferSize
);
33 assert(count
>= -1 && count
<= bufferSize
);
34 return (int32_t)count
;