; Copyright 1996 Acorn Computers Ltd ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. ; ; > s.Tail ; ---------------------------------------------------------------------------------------------------------------------- ; Release linked lists of filters. Note - may be in USER mode or SVC mode - can't use USER stack, ; though, as it may not be okay. Hence not allowed to use the stack at all. ; R2 -> pointer to start of list to kill (pre_filters or post_filters) ; DANGER - CORRUPTS R0-R3 free_list MOV R3, LR LDR r1, [r2,#next_ptr] MOV r0, #0 STR r0, [r2,#next_ptr] ; Get next file in the list 01 MOV r0, #ModHandReason_Free SUBS r2, r1, #0 MOVEQ PC, R3 ; Free the workspace LDR r1, [r2,#next_ptr] SWI XOS_Module B %BT01 ; ---------------------------------------------------------------------------- ; Mark as dead any filters that match on the given Task ID ; We don't free the list entry since any subsequent call to Filter_DeRegister ; would return an unknown filter error. ; R1 -> pointer to start of list to walk ; R2 = Task ID flag_quit_list ROUT Push "r0,LR" MOV r0,r1 01 CMP r0,#0 ; List end? Pull "r0,PC",EQ LDR r14,[r0,#f_task] TEQ r14,r2 ORREQ r14,r14,#f_task_quit STREQ r14,[r0,#f_task] LDR r0,[r0,#next_ptr] B %BT01 ; ---------------------------------------------------------------------------- [ standalone declareresourcefsfiles Entry "r0" ADR R0,resourcefsfiles SWI XResourceFS_RegisterFiles ; ignore errors EXIT resourcefsfiles ResourceFile $MergedMsgs, Resources.FilterMgr.Messages DCD 0 ] ; ---------------------------------------------------------------------------------------------------------------------- ; Neil's debugging routines [ debug InsertNDRDebugRoutines ] END