Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/arch/sparc/gen/swapcontext.S
RevisionDateAuthorComments
 1.5  12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.4  12-Sep-2012  manu branches: 1.4.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@
 1.3  28-Apr-2008  martin branches: 1.3.4; 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2  18-Jan-2003  thorpej branches: 1.2.30;
Merge the nathanw_sa branch.
 1.1  21-Nov-2002  martin branches: 1.1.2;
file swapcontext.S was initially added on branch nathanw_sa.
 1.1.2.1  21-Nov-2002  martin Add context handling functions from Klaus Klein.
 1.2.30.1  18-May-2008  yamt sync with head.
 1.3.8.2  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1  28-Apr-2008  martin file swapcontext.S was added on branch christos-time_t on 2008-04-28 20:22:58 +0000
 1.3.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1  30-Oct-2012  yamt sync with head
 1.4.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.

RSS XML Feed