Nick Briggs
ed77b2fb7b
Convert to LAddrFromNative, NativeAligned2FromLAddr in return.h
2022-09-01 12:53:23 -07:00
Nick Briggs
7dc889249b
Convert from LADDR_from_68k to LAddrFromNative in arith.h
2022-09-01 12:53:23 -07:00
Nick Briggs
ee777103ad
Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned4FromLAddr/LAddrFromNative in stack.h
2022-09-01 12:53:23 -07:00
Nick Briggs
76e1503249
Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned2FromLAddr/NativeAligned4FromLAddr/LAddrFromNative in testtool.c
2022-09-01 12:53:23 -07:00
Nick Briggs
7377613aab
Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in kprint.c
2022-09-01 12:53:23 -07:00
Nick Briggs
5fcd1ced65
Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in initsout.c
2022-09-01 12:53:23 -07:00
Nick Briggs
e6d981632e
Convert from Addr68k_from_LADDR to NativeAligned4FromLAddr in timer.c
2022-09-01 12:53:23 -07:00
Nick Briggs
a2c908fc32
Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned... in lisp2c.c
2022-09-01 12:53:23 -07:00
Nick Briggs
9df1ea251a
Replace Addr68k_from_LADDR with NativeAligned2FromLAddr/NativeAligned4FromLAddr in bin.c
2022-09-01 12:53:23 -07:00
Nick Briggs
cde0be42f0
Replace Addr68k_from_LADDR by NativeAligned[x]FromLAddr() as appropriate in inlineC.h
2022-09-01 12:53:23 -07:00
Nick Briggs
29f2a78a2f
Replace Addr68k_from_LADDR by NativeAligned4FromLAddr
2022-09-01 12:53:23 -07:00
Nick Briggs
61d6cdbcc9
Replace Addr68k_from_LADDR by NativeAligned2FromLAddr/NativeAligned4FromLAddr
2022-09-01 12:53:23 -07:00
Nick Briggs
ead2a6771c
Replace Addr68k_from_LADDR by NativeAligned2FromLAddr/NativeAligned4FromLAddr
2022-09-01 12:53:23 -07:00
Nick Briggs
5a3425e426
Use NativeAligned4FromLAddr() to access FIXP cells in arithops.c
2022-09-01 12:53:23 -07:00
Nick Briggs
010329f29d
Convert to NativeAligned4FromLAddr/LPage in macros defined in cell.h
2022-09-01 12:53:23 -07:00
Nick Briggs
8a0804831e
Once and only once for code in GetXXX68k() and GetXXXnew() macros
2022-09-01 12:53:23 -07:00
Nick Briggs
eae42d1a6d
Switch from Addr68k_from_LADDR to NativeAligned4FromLAddr in arith.h
2022-09-01 12:53:23 -07:00
Nick Briggs
ed5e504b06
Resolve ~90 cast-align warnings generated by macros in my.h
2022-09-01 12:53:23 -07:00
Nick Briggs
215a22ea9f
Introduce functions to convert between lisp addresses and native pointers
...
Instead of using a single macro that converts from a lisp pointer to
a native pointer to a 2-byte aligned item then perhaps casting to objects
that require 4-byte alignment... use separate functions for 2-byte and
4-byte aligned pointer results. The clients should be explicit about
which alignment they require, and the conversion functions can check
(perhaps in DEBUG mode) that the resulting pointer is on an appropriate
boundary.
This commit defines the functions but does not introduce any uses.
2022-09-01 12:53:23 -07:00
Nick Briggs
5202c71a95
Merge pull request #442 from Interlisp/memory-allocation-via-mmap
...
Use mmap() in place of posix_memalign() to allocate Lisp memory
2022-09-01 11:18:23 -07:00
Nick Briggs
2b270e6697
Use mmap() in place of posix_memalign() to allocate Lisp memory
...
posix_memalign() does not guarantee initializing the allocated
memory to zero, which Lisp expects, so the code must memset() the
entire allocated region to zero. The effect of this is (generally) to
force the allocation of RAM to the process, which is wasteful, since
we normally start with only 4% of 256 MB in use for a full.sysout.
Allocating memory with mmap, using MAP_ANON, guarantees that the
memory is already zeroed (effectively mapping /dev/zero with copy-on-write)
so it is not necessary to touch it before use. This keeps the
pre-allocated RAM to a minimum.
2022-08-31 12:42:39 -07:00
Nick Briggs
59d3446c6a
Merge pull request #441 from kuriboshi/fix/mkvdate
...
Run the 'mkvdate' script relative to CMAKE_CURRENT_SOURCE_DIR
2022-08-29 08:19:57 -07:00
Krister Joas
0c505f9576
Run the 'mkvdate' script relative to CMAKE_CURRENT_SOURCE_DIR
...
This fixes the limitation that the build directory has to be in the
source tree and can instead be located anywhere.
2022-08-29 18:18:38 +09:00
Nick Briggs
51fffe5827
Merge pull request #440 from Interlisp/warning-cleanup-part1
...
Start to address warnings from -Weverything
2022-08-18 12:42:56 -07:00
Nick Briggs
d35b964393
Cleanup in eqf.c
...
Correct procedure declarations since N_OP_xxx function args are all LispPTRs
Replace my.h defn of IsNumber() with Numberp() defn in lsptypes.h
2022-08-15 16:19:38 -07:00
Nick Briggs
58f6f68c7e
Correct procedure declarations since N_OP_xxx function args are all LispPTRs
2022-08-15 16:18:37 -07:00
Nick Briggs
873d4927ce
Wholesale removal of deprecated register attribute from all source files
2022-08-15 15:04:07 -07:00
Nick Briggs
5c0349cc69
Remove deprecated register attribute, ensure return types match system call results in chardev.c
2022-08-15 14:50:59 -07:00
Nick Briggs
d509224797
Add explicit cast to byte_swap_word to resolve implicit conversion issue
...
warning: implicit conversion loses integer precision: 'int' to 'unsigned short'
2022-08-15 14:43:32 -07:00
Nick Briggs
f8f7b2ace9
Clean up types in dsk.c
...
Remove deprecated register attribute
Ensure correct type used to store result of system calls
Use memset to zero buffer vs byte-at-a-time stores
Use GetPosSmallP where appropriate
2022-08-15 13:44:28 -07:00
Nick Briggs
89c01ad00a
Fix pointer vs. unboxed fixp in certain fields in onde_array/general_array
2022-08-15 13:32:08 -07:00
Nick Briggs
3075cc93bb
Fix types for smallp manipulation in arith.h
...
Introduce GetPosSmallp for converting an unsigned value to smallp
Use [unsigned] long as input to Get...Smallp to avoid shortening input
2022-08-15 13:26:53 -07:00
Nick Briggs
4a02a1a24d
Rename lisp2c's LispStringLength to LispStringSimpleLength
...
Avoid confusion with the LispStringLength definition in locfile.h
This lisp2c function ONLY looks at the fillpointer for the length.
2022-08-14 21:43:48 -07:00
Nick Briggs
813d2aa2b5
Inline GetSmalldata and GetSmallp to improve type diagnostics, code, and readability in arith.h
2022-08-14 16:53:22 -07:00
Nick Briggs
1fe71e5b84
Cleanups in vmemsave.c
...
Remove deprecated register attribute
Use #ifdef SYM (vs #if SYM) when SYM may be undefined
Use ptrdiff_t rather than int for pointer differences
Correct signedness problems
2022-08-14 13:54:24 -07:00
Nick Briggs
8d804ad5cd
Cleanup signedness, remove abuse of comma operator, use C99 local for-loop decls where appropriate
2022-08-14 13:46:27 -07:00
Nick Briggs
ad045ce356
Alarm timer requires an unsigned timeout value in timer.c, timeout.h
2022-08-14 12:50:16 -07:00
Nick Briggs
c49eb4a4ce
Clean up abuse of comma operator as statement separator in vmemsave.c
2022-08-14 12:06:02 -07:00
Nick Briggs
1c5881fad4
Cleanups in uutils.c
...
Resolve shadow declarations
Remove deprecated register attribute
Simplify for-loop syntax, use C99 style loop var declaration
Make (not used elsewhere) string functions static
2022-08-14 11:44:27 -07:00
Nick Briggs
77ad9204af
Remove unused variable and avoid shadow declarations, declare temps near point-of-use in unixcomm.c
2022-08-14 10:55:56 -07:00
Nick Briggs
89c3041339
bitmaps only referenced internally in xbitmaps.h can be static
2022-08-14 10:34:24 -07:00
Nick Briggs
142b5679cf
Use correct type for FIXP (and pointer to it), and reformat for readability in my.h
2022-08-13 19:33:24 -07:00
Nick Briggs
0e7dc75fd9
Use correct type for pointer to FIXP in arith.h
2022-08-13 19:31:05 -07:00
Nick Briggs
41e7a15b1e
Fix types for boxed add/subtract, the boxes contain FIXPs not pointers
2022-08-13 16:04:58 -07:00
Nick Briggs
5a7cfcbbe7
Correct procedure declarations since N_OP_xxx function args are all LispPTRs
2022-08-13 15:55:11 -07:00
Nick Briggs
9e2b3eb882
Types work out better and better code if not trying to over-optimize memory accesses in arith.h
2022-08-13 15:35:18 -07:00
Nick Briggs
543f7985a2
Fix type of parameter to SAFEREAD in unixfork.c
2022-08-13 09:11:58 -07:00
Nick Briggs
c07ad9fe8e
A couple of variables that should be static rather than global in unixfork.c
2022-08-13 09:11:58 -07:00
Nick Briggs
fff53ba224
Move ldeboot.c #defines to under same #if condition as when they are used
2022-08-13 09:11:58 -07:00
Nick Briggs
d842b284ac
correct prototype declaration for process_io_events
2022-08-13 09:11:58 -07:00