[PATCH 0/9] support for {get, set, make, swap}context for ARM, MIPS, i386 and x86_64

Florian Fainelli florian at openwrt.org
Wed Jan 9 15:17:20 UTC 2013


Hi all,

This patch serie contains the recently posted user context support for ARM,
i386 and x86_64 which were recently posted by Timon and Natanael.

I also needed these routines on MIPS, so I decided to consolidate all of this
such that it addresses comments made to previous patches, as well as ease the
integration of Carmelo's SH4 patches [1] in the future.

[1]:
http://git.stlinux.com/?p=stm/uclibc.git;a=commitdiff;h=5bc8059626bea83f157017ba6ed14faea0158089;hp=ac72fa4e2953be3da2b2a904c84d9ebbece3bfb4

Changes since v1:
- addressed comments from Bernhard

Florian Fainelli (9):
  Rules.mak: define a global PTHREAD_GENERATE_MANGLE variable
  libc: add rule to generate ucontext_i.{c,h,s} files and clean them
  Config.in: add ARCH_HAS_UCONTEXT configuration symbol
  libc: add {get,set,swap,make}context to MIPS
  libc: add {get,set,swap,make}context to ARM
  libc: add support for {get,set,swap,make}context to i386
  libc: add support for {get,set,swap,make}context to x86_64
  include/ucontext.h: provide declarations for
    {get,set,make,swap}context
  uClibc: introduce UCLIBC_HAS_CONTEXT_FUNCS configuration symbol

 Rules.mak                                          |    2 +
 extra/Configs/Config.arm                           |    1 +
 extra/Configs/Config.i386                          |    1 +
 extra/Configs/Config.in                            |   16 ++
 extra/Configs/Config.mips                          |    1 +
 extra/Configs/Config.x86_64                        |    1 +
 include/ucontext.h                                 |   29 ++-
 libc/.gitignore                                    |    1 +
 libc/sysdeps/linux/Makefile.commonarch             |   21 +-
 libc/sysdeps/linux/arm/Makefile.arch               |    5 +
 libc/sysdeps/linux/arm/getcontext.S                |   80 ++++++++
 libc/sysdeps/linux/arm/makecontext.c               |   73 +++++++
 libc/sysdeps/linux/arm/setcontext.S                |   76 +++++++
 libc/sysdeps/linux/arm/swapcontext.S               |   63 ++++++
 libc/sysdeps/linux/arm/ucontext_i.sym              |   30 +++
 libc/sysdeps/linux/i386/Makefile.arch              |    5 +
 libc/sysdeps/linux/i386/getcontext.S               |   84 ++++++++
 libc/sysdeps/linux/i386/makecontext.S              |  123 ++++++++++++
 libc/sysdeps/linux/i386/setcontext.S               |   96 +++++++++
 libc/sysdeps/linux/i386/swapcontext.S              |  110 ++++++++++
 libc/sysdeps/linux/i386/ucontext_i.sym             |   30 +++
 libc/sysdeps/linux/mips/Makefile.arch              |    4 +
 libc/sysdeps/linux/mips/getcontext.S               |  148 ++++++++++++++
 libc/sysdeps/linux/mips/kernel_rt_sigframe.h       |   10 +
 libc/sysdeps/linux/mips/makecontext.S              |  188 +++++++++++++++++
 libc/sysdeps/linux/mips/setcontext.S               |  191 ++++++++++++++++++
 libc/sysdeps/linux/mips/swapcontext.S              |  211 ++++++++++++++++++++
 libc/sysdeps/linux/mips/ucontext_i.sym             |   52 +++++
 libc/sysdeps/linux/x86_64/Makefile.arch            |    6 +
 libc/sysdeps/linux/x86_64/__start_context.S        |   49 +++++
 libc/sysdeps/linux/x86_64/getcontext.S             |   88 ++++++++
 libc/sysdeps/linux/x86_64/makecontext.c            |  121 +++++++++++
 libc/sysdeps/linux/x86_64/setcontext.S             |  103 ++++++++++
 libc/sysdeps/linux/x86_64/swapcontext.S            |  121 +++++++++++
 libc/sysdeps/linux/x86_64/ucontext_i.sym           |   37 ++++
 libpthread/nptl/sysdeps/Makefile.commonarch        |    3 +-
 .../sysdeps/unix/sysv/linux/Makefile.commonarch    |    2 -
 37 files changed, 2174 insertions(+), 8 deletions(-)
 create mode 100644 libc/.gitignore
 create mode 100644 libc/sysdeps/linux/arm/getcontext.S
 create mode 100644 libc/sysdeps/linux/arm/makecontext.c
 create mode 100644 libc/sysdeps/linux/arm/setcontext.S
 create mode 100644 libc/sysdeps/linux/arm/swapcontext.S
 create mode 100644 libc/sysdeps/linux/arm/ucontext_i.sym
 create mode 100644 libc/sysdeps/linux/i386/getcontext.S
 create mode 100644 libc/sysdeps/linux/i386/makecontext.S
 create mode 100644 libc/sysdeps/linux/i386/setcontext.S
 create mode 100644 libc/sysdeps/linux/i386/swapcontext.S
 create mode 100644 libc/sysdeps/linux/i386/ucontext_i.sym
 create mode 100644 libc/sysdeps/linux/mips/getcontext.S
 create mode 100644 libc/sysdeps/linux/mips/kernel_rt_sigframe.h
 create mode 100644 libc/sysdeps/linux/mips/makecontext.S
 create mode 100644 libc/sysdeps/linux/mips/setcontext.S
 create mode 100644 libc/sysdeps/linux/mips/swapcontext.S
 create mode 100644 libc/sysdeps/linux/mips/ucontext_i.sym
 create mode 100644 libc/sysdeps/linux/x86_64/__start_context.S
 create mode 100644 libc/sysdeps/linux/x86_64/getcontext.S
 create mode 100644 libc/sysdeps/linux/x86_64/makecontext.c
 create mode 100644 libc/sysdeps/linux/x86_64/setcontext.S
 create mode 100644 libc/sysdeps/linux/x86_64/swapcontext.S
 create mode 100644 libc/sysdeps/linux/x86_64/ucontext_i.sym

-- 
1.7.10.4



More information about the uClibc mailing list