rem: InitSemaphore(&iounit->ListLock);
add: InitSemaphore(&iounit->Lock);
context: InitUnit ( ULONG unit,            struct AHIBase *AHIBase ){  struct AHIDevUnit *iounit;  if( unit == AHI_NO_UNIT )  {    ReadConfig(NULL,AHIBase);    return NULL;  }  else if(!AHIBase->ahib_DevUnits[unit])  {    if((iounit = AllocVec(sizeof(struct AHIDevUnit), MEMF_CLEAR|MEMF_PUBLIC)))    {      NewList(&iounit->Unit.unit_MsgPort.mp_MsgList);      iounit->Unit.unit_MsgPort.mp_Node.ln_Type = NT_MSGPORT;      iounit->Unit.unit_MsgPort.mp_Flags = PA_IGNORE;      iounit->Unit.unit_MsgPort.mp_Node.ln_Name = AHINAME " Unit";      iounit->UnitNum = unit;      InitSemaphore(&iounit->ListLock);      NewList((struct List *)&iounit->ReadList);      NewList((struct List *)&iounit->PlayingList);      NewList((struct List *)&iounit->SilentList);      NewList((struct List *)&iounit->WaitingList);      NewList((struct List *)&iounit->RequestQueue);      if(ReadConfig(iounit,AHIBase))      {        if((iounit->Voices = AllocVec(            sizeof(struct Voice)*iounit->Channels,MEMF_PUBLIC|MEMF_CLEAR)))        {          int i;          struct Voice   *v = iounit->Voices;          struct MsgPort *replyport;                    // Mark all channels as free          for(i = 0 ; i < iounit->Channels; i++)          {            v->NextOffset = FREE;            v++;          }                    replyport = CreateMsgPort();          if( replyport != NULL )          {            struct StartupMessage sm =            {              {                { NULL, NULL, NT_UNKNOWN, 0, NULL },                replyport, sizeof(struct StartupMessage),              },              iounit            };            iounit->Process = CreateNewProcTags( NP_Entry,    (ULONG) &m68k_DevProc,                                                 NP_Name,     (ULONG) AHINAME " Unit Process",                                                 NP_Priority, AHI_PRI,                                                 TAG_DONE );            if( iounit->Process != NULL )            {                  PutMsg( &iounit->Process->pr_MsgPort,                        &sm.Msg );                WaitPort(replyport);                GetMsg(replyport);            }            DeleteMsgPort(replyport);          }        }      }      if(!iounit->Process)        FreeVec(iounit);      else        AHIBase->ahib_DevUnits[unit] = iounit;    }  }  return AHIBase->ahib_DevUnits[unit];}