#if !defined(CSL_LIB) || defined(_OSK) || !defined(_OS9THREAD)
/*
 *								signal() support
 */

#include <signal.h>
#include <types.h>
#include <settrap.h>
#include <const.h>
#include <errno.h>
#include <memory.h>
#include <cglob.h>
#include <stdlib.h>
#include <string.h>
#if defined(_OSK)
#	include <MACHINE/reg.h>
#elif defined(_OS9000)
#	include <regs.h>
#else
#error No OS/proc combination?
#endif

#include "getregs.h"
#include "thread.h"

#if !defined(TRUE)
#define TRUE (1)
#define FALSE (0)
#endif

typedef struct strap_map_entry	strap_map_entry;

struct strap_map_entry {
	int signal;						/* signal number */
	unsigned short strap_num;		/* strap number */
	unsigned short installed;		/* FALSE=not, TRUE=installed */
};

typedef struct sig_entry	sig_entry;

struct sig_entry {
	int sig;						/* signal number */
	void (*func)();					/* function */
	void *gp;						/* global storage for function */
	VOID_STAR_CP_SEMICOLON						/* constant storage for function (if applicable) */
	sig_entry *next;				/* next in list */
};

#ifdef _OS9THREAD
# define TCONST const
#else
# define TCONST
#endif

#if defined(_MPF68K) || defined(_MPFCOLDFIRE)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		T_BUSERR,	0	},
	{ SIGADDR,		T_ADDERR,	0	},
	{ SIGILL,		T_ILLINS,	0	},
	{ SIGFPE,		T_ZERDIV,	0	},
	{ SIGCHK,		T_CHK,		0	},
	{ SIGTRAPV,		T_TRAPV,	0	},
	{ SIGPRIV,		T_PRIV,		0	},
	{ SIGTRACE,		T_TRACE,	0	},
	{ SIG1010,		T_1010,		0	},
	{ SIG1111,		T_1111,		0	},
	{ SIGFPE,		T_FPUNORDC,	0	},
	{ SIGFPE,		T_FPINXACT,	0	},
	{ SIGFPE,		T_FPDIVZER,	0	},
	{ SIGFPE,		T_FPUNDRFL,	0	},
	{ SIGFPE,		T_FPOPRERR,	0	},
	{ SIGFPE,		T_FPOVERFL,	0	},
	{ SIGFPE,		T_FPNOTNUM,	0	},
	{ 0,			0,			0	}
};
#elif defined(_MPF386) 
static TCONST strap_map_entry strap_map[] = {
	{ SIGFPE,		T_DIVERR,	0	},
	{ SIGDBG,		T_DEBUG,	0	},
	{ SIGNMI,		T_NMI,		0	},
	{ SIGBRKPT,		T_BRKPT,	0	},
	{ SIGFPE,		T_OVRFLW,	0	},
	{ SIGBNDCHK,	T_BNDCHK,	0	},
	{ SIGILL,		T_INVLDOP,	0	},
	{ SIGFPE,		T_NOCOPR,	0	},
	{ SIGDBLFLT,	T_DBLFAULT,	0	},
	{ SIGINVTSS,	T_INVLDTSS,	0	},
	{ SIGSEGNP,		T_SEGNOTPRES,	0 },
	{ SIGSTACK,		T_STACK,	0	},
	{ SIGGPROT,		T_GENPROT,	0	},
	{ SIGSEGV,		T_PAGFAULT,	0	},
	{ SIGFPE,		T_COPRERR,	0	},
	{ 0,			0,			0	}
};
#elif defined(_MPFPOWERPC)
static TCONST strap_map_entry strap_map[] = {
	{ SIGCHECK, 	STRAP_MACH,	0	},
	{ SIGSEGV,		STRAP_DATA, 0	},
	{ SIGINST,		STRAP_INSTR, 0	},
	{ SIGALIGN,		STRAP_ALIGN, 0	},
	{ SIGFPE,		STRAP_FPU,	0	},
	{ SIGILL,		STRAP_ILL,	0	},
	{ SIGPRIV,		STRAP_PRIV,	0	},
	{ 0,			0,			0	}
};
#elif defined(_MPFSH5)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		STRAP_ITLBMISS,		0 },
	{ SIGSEGV,		STRAP_RTLBMISS,		0 },
	{ SIGSEGV,		STRAP_WTLBMISS,		0 },
	{ SIGSEGV,		STRAP_EXECPROT,		0 },
	{ SIGSEGV,		STRAP_READPROT,		0 },
	{ SIGSEGV,		STRAP_WRITEPROT,	0 },
	{ SIGILL,		STRAP_RESINST,		0 },
	{ SIGFPE,		FTRAP_FPUDIS,		0 },
	{ SIGFPE,		FTRAP_FPUEXC,		0 },
	{ SIGRADDERR,	STRAP_RADDERR,		0 },
	{ SIGWADDERR,	STRAP_WADDERR,		0 },
	{ SIGIADDERR,	STRAP_IADDERR,		0 },
	{ 0,			0,					0 }
};
#elif defined(_MPFMIPS)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		STRAP_ADEL,	0	},
	{ SIGSEGV,		STRAP_ADES,	0	},
	{ SIGSEGV,		STRAP_IBE,	0	},
	{ SIGSEGV,		STRAP_DBE,	0	},
	{ SIGFPE,		STRAP_COPU,	0	},
	{ SIGFPE,		STRAP_OV,	0	},
	{ SIGSEGV,		STRAP_UTLB,	0	},
	{ SIGTRAP,		STRAP_TRAP,	0	},
	{ 0,			0,			0	}
};
#elif defined(_MPFARM) || defined(_MPFARMBE)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		STRAP_ABORTD,	0 },
	{ SIGSEGV,		STRAP_ABORTP,	0 },
	{ SIGALIGN,		STRAP_ALIGN,	0 },
	{ SIGFPE,		STRAP_DIV0,		0 },
/*	{ SIGFPE,		FTRAP_FPU,		0 }, */
	{ 0,			0,				0 }
};
#elif defined(_MPFSHSIM) || defined(_MPFSH3) || defined(_MPFSH4)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		STRAP_TLBPROTLD, 0 },
	{ SIGSEGV,		STRAP_TLBPROTST, 0 },
	{ SIGALIGN,		STRAP_ADDRLD,	 0 },
	{ SIGALIGN,		STRAP_ADDRST,	 0 },
	{ 0,			0,			0	}
};
#elif defined(_MPFSPARC)
static TCONST strap_map_entry strap_map[] = {
	{ SIGSEGV,		STRAP_INSTRBLK,  0 },
	{ SIGSEGV,		STRAP_DATABLK,   0 },
	{ SIGSEGV,		STRAP_INSTRPER,  0 },
	{ SIGSEGV,		STRAP_DATAPER,   0 },
	{ SIGSEGV,		STRAP_DATAST,    0 },
	{ SIGFPE,		STRAP_ZERODIV,   0 },
	{ SIGILL,		STRAP_NOFLUSH,   0 },
	{ SIGILL,		STRAP_CPDISABLE, 0 },
	{ SIGALIGN,		STRAP_UNALIGNED, 0 },
	{ SIGWINDOWOV,	STRAP_WINDOWOV,  0 },
	{ SIGWINDOWUF,	STRAP_WINDOWUF,  0 },
	{ SIGTAGOV,		STRAP_TAGOV,     0 },
	{ SIGCPE,		STRAP_CP,        0 },
	{ 0,			0,			0	}
};
#else
#error No processor?
#endif

typedef enum { NEED_SIGMASK, NO_SIGMASK } sigmask_state;

#ifdef _OS9THREAD
#include "thread.h"

typedef struct sig_info_t sig_info_t;

struct sig_info_t {
	process_id pid;
	sig_entry **psigs;
	sig_info_t *next;
};

typedef struct data {
	strap_map_entry _strap_map[sizeof(strap_map)/sizeof(strap_map_entry)];
	sig_entry *sigs;				/* head of sorted signal entries */
	sig_entry *free_list;			/* list of free signal entries */
	u_int32 req_size;				/* initially proper size */
	strap temp[2];					/* used for setting straps */
	sig_info_t sig_info;			/* signal distribution structure */
} data;

static void initdata(void *_tdata)
{
	data *tdata = (data *)_tdata;

	tdata->req_size = sizeof(sig_entry);
	memcpy(tdata->_strap_map, &strap_map, sizeof(strap_map));
	tdata->temp[1].vector = 0xffffffff;

	/* insert this threads signal list into list of all threads' signal lists */
	tdata->sig_info.pid = _procid;
	tdata->sig_info.psigs = &tdata->sigs;
	_os_sigmask(1);
	_lib_lock(&gdata_sig_lock, UNSUSPEND);

	tdata->sig_info.next = (sig_info_t *)gdata_sig_hands;
	gdata_sig_hands = (void *)&tdata->sig_info;

	_lib_unlock(&gdata_sig_lock, UNSUSPEND);
	_os_sigmask(-1);
}

static void termdata(void *_tdata)
{
	data *tdata = (data *)_tdata;
	sig_entry *curr, *next;
	sig_info_t *curr_si, *prev_si;
	process_id pid;

	_os_sigmask(1);		/* past this, we don't want any more signals */
	_os_intercept(NULL, NULL);

	/* unlink my list of signals from the list of all signals */
	_lib_lock(&gdata_sig_lock, UNSUSPEND);

	pid = _procid;
	for (prev_si = NULL, curr_si = (sig_info_t *)gdata_sig_hands;
			curr_si;
				prev_si = curr_si, curr_si = curr_si->next)
		if (curr_si->pid == pid)
			break;

	if (curr_si) {
		if (prev_si)
			prev_si->next = curr_si->next;
		else
			gdata_sig_hands = (void *)curr_si->next;
	}

	_lib_unlock(&gdata_sig_lock, UNSUSPEND);

	/* free all my left-over sig_entry structures */
	for (curr = tdata->sigs; curr; curr = next) {
		next = curr->next;
		_os_srtmem(tdata->req_size, curr);
	}
	for (curr = tdata->free_list; curr; curr = next) {
		next = curr->next;
		_os_srtmem(tdata->req_size, curr);
	}
}

#define req_size	tdata->req_size
#define sigs		tdata->sigs
#define free_list	tdata->free_list
#define strap_map	tdata->_strap_map
#define temp		tdata->temp

#define TDATA		tdata, 
#define TDATAN		tdata
#define TDATA_ARG	data* tdata,
#define TDATA_ARGN	data* tdata

static int trap_change(data *tdata, int on, unsigned short vector);
static void free_sig_entry(data *tdata, sig_entry *ent);
static sig_entry *get_sig_entry(data *tdata);
static void (*__signal(data *tdata, int sig, void (*func)(), sigmask_state sigmsk, void *gp COMMA_VOID_STAR_CP))();
#else
static sig_entry *sigs;				/* head of sorted signal entries */
static sig_entry *free_list;		/* list of free signal entries */
static u_int32 req_size = sizeof(sig_entry);	/* initially proper size */
static strap temp[2] = {
	{ 0, 0 },
	{ (u_int32)-1, 0 }
};

#define TDATA		
#define TDATAN		
#define TDATA_ARG	
#define TDATA_ARGN	void

static int trap_change(int on, unsigned short vector);
static void free_sig_entry(sig_entry *ent);
static sig_entry *get_sig_entry(void);
static void (*__signal(int sig, void (*func)(), sigmask_state sigmsk, void *gp COMMA_VOID_STAR_CP))();
#endif	/* !_OS9THREAD */

static sig_entry *lookup_sig(sig_entry *list, int sig, sig_entry **prev);

#include "libglob.h"

static unsigned int trap_entry(unsigned int vector);
static void sig_hand(int sig);

static sig_entry *lookup_sig(sig_entry *list, int sig, sig_entry **prev)
{
	sig_entry *curr = list, *p;

	/* seek to first signal >= to signal sought */
	p = NULL;
	while (curr && curr->sig < sig) {
		p = curr;
		curr = curr->next;
	}
	*prev = p;		/* always update *prev (tail case) */

	/* find it? */
	if (curr && curr->sig == sig)
		return curr;				/* return it */
	return NULL;
}

void (*__signal_p(int sig, void (*func)(int), void* gp COMMA_VOID_STAR_CP))(int)
{
#ifdef _OS9THREAD
	data *tdata = (data *)_getdata(TD_SIGNAL, sizeof(data), initdata, termdata);
	if (tdata == NULL)
		return SIG_ERR;
#endif
	return __signal(TDATA sig, func, NEED_SIGMASK, gp COMMA_CP);
}

static void (*__signal(TDATA_ARG int sig, void (*func)(), sigmask_state sigmsk,
	 void* gp COMMA_VOID_STAR_CP))()
{
	void (*ret)();					/* return value */
	strap_map_entry *map_ent;	/* strap map entry pointer */
	error_code err;
	sig_entry *prev, *ent;
	u_int8 do_strap;				/* TRUE=turn strap on, FALSE=off */

#if defined(_OSK) 
	if (sig < 0 || sig > 0xffff) {
		errno = EOS_PARAM;
		return SIG_ERR;
	}
#endif

	/* mask signals if necessary */
	if (sigmsk == NEED_SIGMASK &&
		(err = _os_sigmask(1)) != SUCCESS) {
		errno = err;
		return SIG_ERR;
	}

#ifdef _OS9THREAD
	/* lock all changes to signal lists (NOTE: signals are masked) */
	_lib_lock(&gdata_sig_lock, UNSUSPEND);
#endif

	if (ent = lookup_sig(sigs, sig, &prev))
		ret = ent->func;		/* return old handling */
	else
		ret = SIG_DFL;			/* return that it used to be SIG_DFL */

	if (func == SIG_DFL) {
		if (ent) {	/* changing to default handling and an entry existed? */
			/* remove it */
			if (prev)			/* mid/end case */
				prev->next = ent->next;
			else				/* head case */
				sigs = ent->next;
			free_sig_entry(TDATA ent);
		}
		do_strap = FALSE;
	}
	else {	/* SIG_IGN and function pointer cases */
		/* existing entry? */
		if (ent) {
			ent->func = func;			/* install new handling */
			ent->gp = gp;
#if _PROC_HAS_CP
			ent->cp = cp;
#endif
		}
		else {
			/* create and add a new entry */
			if ((ent = get_sig_entry(TDATAN)) == NULL)
			{
				if (sigmsk == NEED_SIGMASK) _os_sigmask(-1);
				return SIG_ERR;
			}

			ent->sig = sig;
			ent->func = func;
			ent->gp = gp;
#if _PROC_HAS_CP
			ent->cp = cp;
#endif
			if (prev) {		/* mid/end case */
				ent->next = prev->next;
				prev->next = ent;
			}
			else {			/* head case */
				ent->next = sigs;
				sigs = ent;
			}
		}
		do_strap = TRUE;
	}

#ifdef _OS9THREAD
	/* unlock all changes to signal lists (NOTE: signals are still masked) */
	_lib_unlock(&gdata_sig_lock, UNSUSPEND);
#endif

	if (sig <= 255) {		/* need to check for strap change? */
		map_ent = strap_map;
		while (map_ent->signal) {
			/* signal we're looking for and needing a change */
			if (map_ent->signal == sig &&
				((do_strap && !map_ent->installed) || (!do_strap && map_ent->installed))) 
					if (trap_change(TDATA map_ent->installed = do_strap, map_ent->strap_num) == -1) {
						if (sigmsk == NEED_SIGMASK) _os_sigmask(-1);
						return SIG_ERR;
					}
			++map_ent;
		}
	}

	if (sigmsk == NEED_SIGMASK &&
		(err = _os_sigmask(-1)) != SUCCESS) {
		errno = err;
		return SIG_ERR;
	}

	/* check for need to install _os_intercept */
	if (_signal_inited == FALSE) {
		if ((err = _os_intercept(sig_hand, _get_static())) != SUCCESS) {
			errno = err;
			return SIG_ERR;
		}
		_signal_inited = TRUE;
	}

	return ret;
}
	
/* static */ void sig_hand(int sig)
{
#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
#if defined(_OS9THREAD)
	/*
	 * _getdata() can't fail because we wouldn't be here if we hadn't already
	 * allocated our data
	 */
	data *tdata = (data *)_getdata(TD_SIGNAL, 0, NULL, NULL);
	process_id fid;					/* forwarding process ID */
#endif /* _OS9THREAD */

	void *gp, *oldgp;
#if _PROC_HAS_CP
	void *cp, *oldcp;
#endif /* _PROC_HAS_CP */
#endif /* defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP) */

	void (*func)();
	sig_entry *ent, *prev;

#if defined(_OS9THREAD)
	/* If the data is not available, give up */
	if (tdata == NULL)
	{
_asm("break: nop");
		tdata = (data *)_getdata(TD_SIGNAL, 0, NULL, NULL);
/*		_os_rte(); */
	}
#endif

	if (ent = lookup_sig(sigs, sig, &prev))	{
#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
		gp = ent->gp;
#  if _PROC_HAS_CP
		cp = ent->cp;
#  endif
#endif /* _OS9THREAD || processor with a CP */
		func = ent->func;
	}
	else {
#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
		gp = _get_static();
#  if _PROC_HAS_CP
		cp = _get_const();
#  endif
#endif /* defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP) */
		func = _SIG_DFL;
	}

	switch ((int32)func) {
		case _SIG_DFL:
	 		/*
				The default action is this:
				1. If threading, try to find another thread that wants this
				   signal.
				2. If the user has done intercept() then
				   the default action is to call their handler.
				3. If not, the default action is to exit with the arriving
				   signal as the status.
			*/
#ifdef _OS9THREAD
			{
				sig_info_t *si;
				sig_entry *sink;

				/* signals are already masked */
				_lib_lock(&gdata_sig_lock, UNSUSPEND);

				for (si = (sig_info_t *)gdata_sig_hands; si; si = si->next) {
					if (lookup_sig(*si->psigs, sig, &sink) != NULL) {
						/* remember forwarding PID in case it goes away after unlock */
						fid = si->pid;

						/* unlock this lock so destination thread can excute this code */
						_lib_unlock(&gdata_sig_lock, UNSUSPEND);
						
						(void)_os_send(fid, sig);
						break;
					}
				}
				

				/* find someone else to handle signal? */
				if (si)
					_os_rte();									/* this thread returns */
				else
					_lib_unlock(&gdata_sig_lock, UNSUSPEND);	/* this thread continues (still needs unlock) */
			}
#endif /* _OS9THREAD */

			if (_os_usr_rout) 
			{
#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
				_os_usr_rout_t *info = _os_usr_rout;
				oldgp = _change_static(info->gp);
#  if _PROC_HAS_CP
				oldcp = _change_const(info->cp);
#  endif

				(info->rout)(sig);		/* call user's intercept() */

				_set_const(oldcp);
				_set_static(oldgp);
#else

				(*_os_usr_rout)(sig);		/* call user's intercept() */

#endif /* _OS9THREAD */

				_os_rte();					/* return for them */
			}
			exit(sig);

		default:
			/* change to default handling of signal (signals already masked) */
			func = __signal(TDATA sig, SIG_DFL, NO_SIGMASK, NULL COMMA_NULL);

#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
			oldgp = _change_static(gp);
#  if _PROC_HAS_CP
			oldcp = _change_const(cp);
#  endif
#endif

			(*func)(sig);					/* call user's function */

#if defined(_OS9THREAD) || (defined(_OS9000) && _PROC_HAS_CP)
			_set_const(oldcp);
			_set_static(oldgp);
#endif
			/* fall through to _os_rte */
		case _SIG_IGN:
			_os_rte();
	}
}
	
/* static */ unsigned int trap_entry(unsigned int vector)
{
#ifdef _OS9THREAD
	/* can't fail, because we wouldn't be here if we hadn't already allocated
	   our data */
	data *tdata = (data *)_getdata(TD_SIGNAL, 0, NULL, NULL);
#endif
	strap_map_entry *ent = strap_map;

#if defined(_OS9THREAD)
	/* If the data is not available, give up */
	if (tdata == NULL)
		exit(vector);
#endif

#if defined(_MPF68K) || defined(_MPFCOLDFIRE)
	vector -= 100;			/* adjust down to the vector number */
#endif

	while (ent->signal) {
		if (ent->strap_num == vector) {
			if (raise(ent->signal) != 0)		/* raise the signal */
				exit(errno);
			exit(ent->signal);			/* exit if they return */
		}
		++ent;
	}

	/* this code should never execute! (got to this routine, but don't
	   know the vector) */
#	if defined(_MPF68K) || defined(_MPFCOLDFIRE)
	exit(vector + 100);
#	else
	exit(vector);
#	endif

	return 0;		/* quiet compiler */
}

static int trap_change(TDATA_ARG int on, unsigned short vector)
{
	error_code err;

	/* configure table */
	temp[0].vector = vector;
	temp[0].routine = on ? trap_entry : ((unsigned int (*)())0);

	/* install/remove it */
	if ((err = _os_strap(0, temp)) != SUCCESS) {
		errno = err;
		return -1;
	}

	return 0;
}

static sig_entry *get_sig_entry(TDATA_ARGN)
{
	sig_entry *ret;
	error_code err;

	if (free_list == NULL) {
		/* Should we allocate more than one entry here? */
		/* this will update req_size to proper system memory allocation size */
		if ((err = _os_srqmem(&req_size, (void **)&ret, MEM_ANY)) != SUCCESS) {
			errno = err;
			return NULL;
		}
	}
	else {
		ret = free_list;
		free_list = free_list->next;
	}
	return ret;
}

static void free_sig_entry(TDATA_ARG sig_entry *ent)
{
	/* Should we bound the free list in some way? */
	ent->next = free_list;
	free_list = ent;
}

#else /* !CSL_LIB */
#if defined(_OSK) && 0
# include "../CSL/OS9/csldefs.h"

_asm("
__signal_p:
        jsr _csl_calla(a6)
        dc.w %0
", C___SIGNAL_P
);

#elif defined(_OS9000) && defined(_MPF386)
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        call.l _csl_calla(%ebx)
        dc.w %0
", C___SIGNAL_P
);

#elif defined(_OS9000) && (defined(_MPFARM) || defined(_MPFARMBE))
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        stmfd sp!,{r7-r10}
        add r10,gp,0xfffff000&_csl_calla
        ldr r10,[r10,0xfff&_csl_calla]
        mov r11,%0
        mov pc,r10
", C___SIGNAL_P
);

#elif defined(_OS9000) && defined(_MPFMIPS)
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        lui at,high(_csl_calla)
        addu at,at,gp
        lw at,lo(_csl_calla)(at)
        ori t0,zero,%0 (delay)
        jr at
        nop
", C___SIGNAL_P
);

#elif defined(_OS9000) && defined(_MPFPOWERPC)
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        lwz r0,_csl_calla(r2)
        mtctr r0
        addi r0,r0,%0
        bctr
", C___SIGNAL_P
);

#elif defined(_OS9000) && defined(_MPFSH)
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        mov.l @(callptr,pc),r0
        mov.l @(r0,gp),r0
        jmp @r0
        mov #%0,r1 (delay)
        align 4
callptr dc.l _csl_calla
", C___SIGNAL_P
);

#elif defined(_OS9000) && defined(_MPFSPARC)
# include "../CSL/OS9000/csldefs.h"

_asm("
__signal_p:
        sethi hi(_csl_calla),t1
        add t1,gp,t1
        ld [t1,lo(_csl_calla)],t1
        jmpl t1+zero,zero
        mov %0,t0 (delay)
", C___SIGNAL_P
);

#elif defined(_MPFSH5M)

 #include "../CSL/OS9000/csldefs.h"

 cslbinding(__signal_p, __SIGNAL_P);

#else
# error Unknown processor!
#endif
#endif /* CSL_LIB */

