Commit Graph

22 Commits

Author SHA1 Message Date
Lai Wei-Chih
521bcfb17a [libportable] Add fenv support.
Fix ndk/tests/device/fenv.

Change-Id: I46e1b47c3bec5213e827fabe311ef9e29a28195b
2013-03-26 22:09:17 +08:00
Andrew Hsieh
2f6ae26a67 Fix build >= JB
File arch-mips/sigsetjmp.S includes <asm-generic/portability.h>
already defined in LOCAL_CFLAGS, and build system prior JB
passes LOCAL_CFLAGS for building *.S as well, but no more >=JB.

Use LOCAL_C_INCLUDES instead (pass for *.S too)

Change-Id: I7e6d6e838d632f980aa6c9b6b2b2862bd7de11b1
2013-03-20 11:35:43 -07:00
Lai Wei-Chih
3917ab0c97 Clean up unnecessary wrap functions.
For wrap functions that call real function directly, it could be removed.

Change-Id: I261aa6639349da776e835b9eb74f00b246d4e3c1
2013-03-20 14:30:13 +08:00
WenHan Gu
55128d1aca [ARM] Add unwind portable header adaptor.
ARM expanse some functions to others. For example,
_Unwind_GetIP will be inlined to _Unwind_GetGR, which
will be inlined to _Unwind_VRS_Get. This happens at
header-included level.

However, we use Itanium _Unwind_* header as portable one.
We do the inlining in ARM libportable to prevent
undefined reference to these functions.

Change-Id: Iad94c4a92531cdcfbcf535443fb257d02cb24c43
Signed-off-by: WenHan Gu <Wenhan.gu@mediatek.com>
2013-03-06 10:25:32 +08:00
Pete Delaney
183963db80 [MIPS] Portable versions of setjmp, sigsetjmp, ...
The portable (ARM) jmp_buf and sigjmp_buf structures are smaller than the native
(MIPS) structures so it is not safe to simply call the standard bionic routines.

Luckily there is a lot of redundant space in the standard MIPS structures
and it is possible to save all of the needed registers in the area provided by the
ARM application.

Change-Id: I694a90516cdf96d581863e833776092830afe3cc
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Paul Lind <paul.lind@imgtec.com>
2013-02-20 20:07:33 -08:00
Pete Delaney
860342e989 [MIPS] Added support for STDIO sflags().
sflags() returns open() flags via a pointer passed to sflags().

Change-Id: I854dc4302bf09318e97eb3129a8debf98dbe8735
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Paul Lind <paul.lind@imgtec.com>
2013-02-20 20:06:46 -08:00
Pete Delaney
c684613e19 [MIPS] Added support for file descriptor related system calls.
Specifically these functions are now supported:
    signalfd4(), eventfd(), timerfd_create(),
    pipe(), and inotify_init1()

Modified syscall_portable() to call signalfd4_portable(),
eventfd_portable(), eventfd2_portable(), and timerfd_create().
These system calls enable the read system calls to access
kernel data structures.

The signalfd4() enables read to return a signalfd_siginfo structure
which have the signal number and errno mapped until an execve().
This is similar to the maintaining a table of signal handlers to
map the signal numbers done earlier. This mapping is extended to
the process after an execve() by passing the final set of mapped
file descriptors via a pair of environment variables.

Disabling signal and file descriptor read mapping in parent
if the child would break the mapping algorithms.

This code passes at least all of the non-POSIX LTP tests,
including an updated LTP signalfd4 test that posts SIGNALS
and uses this read() mechanism to get signal info.

inotify_init1 is similar to signalfd(), timerfd() and other
filefd functions which map read() calls. Unlike signalfd(), and
similar to timerfd(), the reads don't appear to need to be mapped.

The members of the inotify_event structure appear to be generic.
The mask bits like IN_MOVE_FROM and IN_MOVE_TO are defined in
generic files. The LTP test in testcases/kernel/syscalls/inotify
test for the inotify_event structure being inotify_event structure
being read and does seem to check it contents being correct.

Change-Id: I3f2dcd4e33437ac953cd9f67f56dccc6ec6e5e6f
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Paul Lind <paul.lind@imgtec.com>
2013-02-20 20:05:19 -08:00
Pete Delaney
4977f77e79 [MIPS] Unify around a consistent *_ntop/*_pton style.
Unifying around the <class>_ntop() style;
changing ntop_*() and pton_* to *_ntop() and *_pton().

Also added portable versions of strerror() and strerror_r()
while updating the errno.c file.

Change-Id: I2a0f40963f293ef9387b0dbcb3426276d301a17c
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Paul Lind <paul.lind@imgtec.com>
2013-02-20 20:02:09 -08:00
Lai Wei-Chih
2c9e934fc5 Let users could query cpu features on device.
Change-Id: I9f5d7c66fb4248f5f8cbbf4c350b82a5b8c3aee9
2012-10-23 10:05:22 +08:00
Pete Delaney
bf03a1b304 [MIPS] Add support for waitpid.
Change-Id: I7b3b90f9a64d40c5aa72c74cac6881f1189c1462
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Pete Delaney  <piet@mips.com>
2012-10-05 02:18:27 -07:00
Pete Delaney
79d42207b8 [MIPS] Add Support pthread library functions.
Signals needed to be mapped.

Change-Id: I946308f17cf7bc945287f716d0da50f515ac8fc4
Signed-off-by: Pete Delaney  <piet@mips.com>\
Signed-off-by: Chris Dearman <chris@mips.com>
2012-10-05 02:18:04 -07:00
Pete Delaney
fbedea894c [MIPS] Add Support clone.
Change-Id: I3320c38e4228ba0aba37fe5af93e6f467c2e1b12
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Pete Delaney  <piet@mips.com>
2012-10-05 02:17:39 -07:00
Pete Delaney
9b350a5d22 [MIPS] Add Support for syscall.
Change-Id: Ib9c13ea152fdfe58b36362442eeef88e4a463c31
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Pete Delaney  <piet@mips.com>
2012-10-05 00:23:49 -07:00
Pete Delaney
0d05107265 [MIPS] Add Support timer_create.
Signals needed to be mapped.

Change-Id: Id0748924f16ac6787b87062d774e837a14d1233c
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Pete Delaney  <piet@mips.com>
2012-10-05 00:23:49 -07:00
Pete Delaney
79b607b432 [MIPS] Add Support signal.
Change-Id: Ie2aa6cd24a119f96cd01c6b3d6352f011a0825b5
Signed-off-by: Pete Delaney  <piet@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
2012-10-05 00:23:49 -07:00
Pete Delaney
25cabbf92e [MIPS] Add Support errno, Added Logging, sorted Android.mk files.
Change-Id: Ibeeab51feb77be07ea8ccacf2f448bb5135d7373
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Pete Delaney   <piet@mips.com>
2012-10-05 00:23:49 -07:00
Chao-Ying Fu
9f49f16bdf Support getrlimit and setrlimit for MIPS.
Change-Id: Iff030a0eb2444bd1ba75dff9ba6b76c7cf9e0e7d
2012-08-21 17:24:01 -07:00
Chao-Ying Fu
4cd3283046 Support poll for MIPS.
Change-Id: I1299817ea06c9f9ff5701dce0c6166370ef9e87d
2012-08-21 15:27:38 -07:00
Chao-Ying Fu
5f79ffb271 Support fcntl for MIPS with different cmd.
Change-Id: I8d180ab9e18d69f0fd2748ad317319b691a86f35
2012-08-20 18:08:30 -07:00
Chao-Ying Fu
64c217eb07 Add portable support for stuct statfs and two functions.
Change-Id: I1e34428574a11bedb3a5a35a45dc519fcae3cd03
2012-08-17 12:22:39 -07:00
Chao-Ying Fu
3e1d447f43 Add portable support for errno.h.
Change-Id: Ia232caff586a1296b4330f450e4cfe4fec51198b
2012-08-15 11:58:43 -07:00
Shih-wei Liao
bf1b1e6c7f Move libportable from ndk.git to development.git.
libportable should be in development.git instead of ndk.git.

Change-Id: Ic369ca6a0e4ffbd2741777c8d9ec578e8ce5abbd
2012-08-14 01:43:15 -07:00