Commit Graph

6 Commits

Author SHA1 Message Date
Lai Wei-Chih
db279bedd6 [MIPS] Add missing REAL macros.
Change-Id: If396e16a759d90f94213deb536f3d1c9dcb6c132
2013-07-15 10:09:06 +08:00
Andrew Hsieh
6433ec22b1 Use linker -Wl,--wrap=symbol
Linker --wrap option resolves to __wrap_symbol for undefined symbol.
During the compilation of host libportable.a, __HOST__ is defined
to rename all portable functions to  __wrap_symbol, and the
real function to __real_symbol.  This way libportable.a can be
validated at host w/o changes of user's source code.

See http://sourceware.org/binutils/docs/ld/Options.html

Change-Id: Idcbe53dd642536f3dc2be85a875f95535b9dc0b1
2013-03-18 21:55:39 -07:00
Pete Delaney
6732a917fd [MIPS] Add Real Time Signal Functions and minor bug fixes.
1. Added:
        rt_sigaction(),
        rt_sigprocmask(), and
        rt_sigtimedwait portable syscalls.

    2. Fixed a bug in signal.c.

    3. Added a new pair of functions to map siginfo_t
       between portable and native formats.

    4. Fixed LTP rt_siqqueueinfo01 and siqqueue() test failures.

    5. Using these new siginfo_t mapping functions in functions
       that were previously doing this functionality internally:
          a. mips_sigaction_handler()
          b. __rt_sigtimedwait_portable()

    6. Modified rt_sigqueueinfo_portable():
      a. Added a call to this new siginfo_pton() function.
      b. Fixed native_sig calculation; it was converting
         with the wrong function (ntop instead of pton).

    7. Added the Thread Group Flavor of Real Time version of
       sigqueueinfo().

    8. Added and tested the sigqueue() implementation thought it's
       not supported by Android yet. Using a LTP library function
       to implement it via syscall for now.  Android has a
       sysconf() regression that will be addressed in a separate
       commit.

    9. Modified some of the variable names in:

          __rt_sigtimedwait_portable()

       to make it easier/faster to read.

    10. Fixed a SIGTERM --> SIGTERM_PORTABLE mapping bug.

Most LTP Posix sigqueue() tests and the rt_sigqueueinfo01() test
now pass with this commit.

Change-Id: I5a2c28c4f5863cc013fe0c7fce819fa5b7a6dcc7
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Douglas Leung <douglas.leung@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:52 -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
Pete Delaney
2928edfab9 [MIPS] Tighten up code to fit within 100 characters lines.
File poll.c had a wide line and the reason for the asymmetric
mapping of the event flags wasn't obvious on my reviewing
this code. Seemed to justify adding some clarification.

Both signal.c and socket.c were using lengthy function names
for Portable <--> Native mappings. Switch to the newer *_ntop()
style in wide files and made the ALOGV() messages more useful.

Also changed mapping of portable SIGSTKFLT to native SIGEMT
while editing a wide line in the signal.c file.  MIPS has no
SIGSTKFLT signal, nor ARM a signal SIGEMT. Using SIGEMT as a
proxy for SIGSTKFLT_PORTABLE for Lib-Portable applications.
This makes the signal mapping reversible during signal handling.

Fixed ALOGV() Entry/Exit brackets to match.

Change-Id: I9a91992e67ab24322db608424bf69c47fad8e18d
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:01:15 -08: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