1 /*******************************************************************
3 ** Forth Inspired Command Language
4 ** Author: John Sadler (john_sadler@alum.mit.edu)
5 ** Created: 16 Oct 1997
6 ** Implementations of FICL external interface functions...
8 *******************************************************************/
10 /* $FreeBSD: src/sys/boot/ficl/alpha/sysdep.c,v 1.7.2.1 2000/07/06 23:51:46 obrien Exp $ */
11 /* $DragonFly: src/sys/boot/ficl/alpha/Attic/sysdep.c,v 1.2 2003/06/17 04:28:18 dillon Exp $ */
22 ******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
25 #if PORTABLE_LONGMULDIV == 0
26 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
31 qx = (u_int64_t)x * (u_int64_t) y;
33 q.hi = (u_int32_t)( qx >> 32 );
34 q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
39 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
45 qx = (qh << 32) | q.lo;
54 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline)
66 void *ficlMalloc (size_t size)
71 void *ficlRealloc (void *p, size_t size)
73 return realloc(p, size);
76 void ficlFree (void *p)
83 ** Stub function for dictionary access control - does nothing
84 ** by default, user can redefine to guarantee exclusive dict
85 ** access to a single thread for updates. All dict update code
86 ** is guaranteed to be bracketed as follows:
87 ** ficlLockDictionary(TRUE);
88 ** <code that updates dictionary>
89 ** ficlLockDictionary(FALSE);
91 ** Returns zero if successful, nonzero if unable to acquire lock
92 ** befor timeout (optional - could also block forever)
95 int ficlLockDictionary(short fLock)
100 #endif /* FICL_MULTITHREAD */