Successfully added mutexes protecting freelist access. No behaviour change.

This commit is contained in:
Simon Brooke 2026-04-20 13:59:47 +01:00
parent c59825d7fe
commit f05d1af9d6
14 changed files with 132 additions and 69 deletions

View file

@ -35,12 +35,12 @@ struct pso_pointer lisp_bind(
struct pso_pointer value = fetch_arg( frame, 1 );
struct pso_pointer store = fetch_arg( frame, 2 );
return c_cons( c_cons( key, value ), store );
return make_cons( make_cons( key, value ), store );
}
struct pso_pointer c_bind( struct pso_pointer key,
struct pso_pointer value,
struct pso_pointer store ) {
// todo: issue #21: must have stack frame passed in.
return c_cons( c_cons( key, value ), store );
return make_cons( make_cons( key, value ), store );
}

View file

@ -84,11 +84,11 @@ struct pso_pointer eval(
// break;
default:
result =
make_exception( c_cons
make_exception( make_cons
( c_string_to_lisp_string
( L"Can't yet evaluate things of this type: " ),
result ), frame_pointer,
c_cons( c_cons
make_cons( make_cons
( c_string_to_lisp_keyword( L"tag" ),
get_tag_string( result ) ), nil ),
nil );

View file

@ -66,7 +66,7 @@ struct pso_pointer cons(
struct pso4 *frame = pointer_to_pso4( frame_pointer );
#endif
return c_cons( fetch_arg( frame, 0 ), fetch_arg( frame, 1 ) );
return make_cons( fetch_arg( frame, 0 ), fetch_arg( frame, 1 ) );
}
#endif

View file

@ -52,7 +52,7 @@ void c_repl( bool show_prompt ) {
signal( SIGINT, int_handler );
debug_print( L"Entered repl\n", DEBUG_REPL, 0 );
struct pso_pointer env = consp( oblist ) ? oblist : c_cons( oblist, nil );
struct pso_pointer env = consp( oblist ) ? oblist : make_cons( oblist, nil );
struct pso_pointer input_stream = c_assoc( lisp_io_in, env );
struct pso_pointer output_stream = c_assoc( lisp_io_out, env );

View file

@ -44,7 +44,7 @@ struct pso_pointer c_reverse( struct pso_pointer sequence ) {
struct pso2 *object = pointer_to_object( cursor );
switch ( get_tag_value( cursor ) ) {
case CONSTV:
result = c_cons( c_car( cursor ), result );
result = make_cons( c_car( cursor ), result );
break;
case KEYTV:
// TODO: should you be able to reverse keywords and symbols?
@ -65,7 +65,7 @@ struct pso_pointer c_reverse( struct pso_pointer sequence ) {
break;
default:
result =
make_exception( c_cons( c_string_to_lisp_string
make_exception( make_cons( c_string_to_lisp_string
( L"Invalid object in sequence" ),
cursor ), nil, nil, nil );
goto exit;