Repository navigation
dos.library: AllocDosObject/FreeDosObject for DOS_STDPKT and DOS_CLI - #187
Conversation
|
Looks like this conflicts with a recent merge to main (probably #191, which touched the same AllocDosObject/FreeDosObject code). Could you rebase on main and resolve the conflicts? Thanks! |
|
Also worth noting: #186 is now closed — #191 (merged to main) implemented |
With sidick#191's DOS_FILEHANDLE, every type <dos/dos.h> defines is now implemented. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
45136db to
3c6a407
Compare
|
Rebased on main and narrowed: #191's |
Fills in the 0.13 changelog: ixemul.library's full path-based file I/O (GetDeviceProc's dvp_Port, the path packet actions, and Info()) from #197/#198, Supervisor()'s real exception frame unblocking nested library calls from #199, the dl_TimeReq clock() fix from #194, the remaining AllocDosObject types (DOS_STDPKT/DOS_CLI) from #187, and #200's new_lock leak fix. Also documents these in Supported-Libraries.md (expanded packet-action list, Supervisor's RTE-anywhere support, dl_TimeReq). Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Rebased on main after #191, which implemented
DOS_FILEHANDLE(better integrated than this PR's version, which is dropped). What remains are the two types<dos/dos.h>defines that are still missing, so that every type is implemented:DOS_STDPKT(3): a zeroedstruct StandardPacketwithsp_Msg.mn_Node.ln_Name->sp_Pktandsp_Pkt.dp_Link->sp_Msg. As in the autodoc and AROS'sallocdospacket(), the pointer returned (and taken back byFreeDosObject) is theDosPacketpart, 20 bytes in. It is the documented way to get a packet forSendPkt/WaitPkt, and needs nothing from the runtime's own bookkeeping.DOS_CLI(4): astruct CommandLineInterfacewith its fourBSTRbuffers (cli_SetName,cli_CommandName,cli_CommandFile,cli_Prompt), sized byADO_DirLen/ADO_CommNameLen/ADO_CommFileLen/ADO_PromptLen(255 each when absent, as in AROS) plus the length byte, each an empty string. Per<dos/dostags.h>, everything else is zero exceptcli_FailLevel(10) andcli_Background(DOSTRUE).FreeDosObjectfrees the buffers too. This is the object as realAllocDosObjectreturns it, not attached to the runtime'spr_CLI; a caller that wants that installs it itself, as on AmigaOS.DOS_FILEHANDLEkeeps #191's path. The plain zeroed types and the two new ones share analloc_dos_block/free_dos_blockpair;exectask.rsgains the CLI field offsets, andutility::find_tag_item_implbecomespub(crate)for the tag lookup. An unknown type still fails loudly; the test for that now uses 6, since 4 isDOS_CLI.No binary in the corpus needs these yet: ixemul no longer depends on this PR, as you noted. If you'd rather keep to adding types when a binary needs them, feel free to close it.
Tests
New end-to-end tests: the
StandardPacketlinks, theDOS_CLIdefaults,DOS_CLIwith anADO_PromptLentag list, and alloc/free round trips for both types that check the blocks (and the CLI buffers) are really freed.Spotted on the way:
end_to_end_alloc_and_free_dos_object_fib_round_tripand the RDArgs round trip move the object into D2 with0x2E02, commentedmove.l d3,d2, but that encodesmove.l d2,d7, so theirFreeDosObjectgets the NULL tags and frees nothing. The new round trips use0x2403. Not changed here.cargo test -p volamos-core: all pass exceptexectask::tests::pending_host_break_folds_into_check_signaland..._into_wait, which fail the same way on main when the whole suite runs, and pass alone.🤖 Generated with Claude Code