xref: /netbsd-src/lib/libc/arch/ia64/gen/makecontext.c (revision 53744582f11a3d467a65d3ea9d72444dc68e4bcb)
1*53744582Sscole /*	$NetBSD: makecontext.c,v 1.2 2016/11/22 22:50:32 scole Exp $	*/
221984c24Sscole 
321984c24Sscole /*-
421984c24Sscole  * Copyright (c) 2016 The NetBSD Foundation, Inc.
521984c24Sscole  * All rights reserved.
621984c24Sscole  *
721984c24Sscole  * Redistribution and use in source and binary forms, with or without
821984c24Sscole  * modification, are permitted provided that the following conditions
921984c24Sscole  * are met:
1021984c24Sscole  * 1. Redistributions of source code must retain the above copyright
1121984c24Sscole  *    notice, this list of conditions and the following disclaimer.
1221984c24Sscole  * 2. Redistributions in binary form must reproduce the above copyright
1321984c24Sscole  *    notice, this list of conditions and the following disclaimer in the
1421984c24Sscole  *    documentation and/or other materials provided with the distribution.
1521984c24Sscole  *
1621984c24Sscole  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1721984c24Sscole  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1821984c24Sscole  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1921984c24Sscole  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2021984c24Sscole  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2121984c24Sscole  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2221984c24Sscole  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2321984c24Sscole  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2421984c24Sscole  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2521984c24Sscole  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2621984c24Sscole  * POSSIBILITY OF SUCH DAMAGE.
2721984c24Sscole  */
2821984c24Sscole 
2921984c24Sscole #include <inttypes.h>
3021984c24Sscole #include <stddef.h>
3121984c24Sscole #include <ucontext.h>
3221984c24Sscole #include "extern.h"
3321984c24Sscole 
3421984c24Sscole #if __STDC__
3521984c24Sscole #include <stdarg.h>
3621984c24Sscole #else
3721984c24Sscole #include <varargs.h>
3821984c24Sscole #endif
3921984c24Sscole 
4021984c24Sscole void
makecontext(ucontext_t * ucp,void (* func)(void),int argc,...)4121984c24Sscole makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
4221984c24Sscole {
4321984c24Sscole   /* XXX implement, halt in ski */
44*53744582Sscole   __asm __volatile("break.i 1");
4521984c24Sscole }
46