Boost logo

Boost :

Subject: Re: [boost] Persistency library
From: Lifshitz, Yair (yair.lifshitz_at_[hidden])
Date: 2011-09-26 03:27:30


> > > I assume resuming from a checkpoint would also require to restore
> > > the registers, flags, stack (pointer), instruction pointer etc. -
> > > I'd like to know if your lib supports only intel or some other architectures too.
> > >
> > > Oliver
> >
> > Your assumption is correct.
> > However, the actual implementation is done via
> > getcontext()/setcontext(), so it is not hard-wired to a specific hardware architecture.
>
> You know that ucontext-stuff (getcontext()/setcontext()/swapcontext()/makecontext()) is deprecated by POSIX 2003 and removed by POSIX 2008?
> For instance glibc doesn't implement those functionality on ARM.
>
> I don't know your implementation but on x86_64 the makecontext() function of glibc can not handle pointers as arguments (var-args for makecontext()).
> comment from makecontext.c (glibc-2.14): 'This implementation currently only handles integer arguments.'
> If you want to pass a pointer to the context-function via makecontext() you get a truncated address.
>
> Oliver

I was unaware of this. My implementation does not rely on varags in makecontext().
Practically, it is possible to achieve the same flexibility by using setjmp()/longjmp() with minor effort.

I believe this is common enough and supported on all platforms.

Yair
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk