OSMemory fix in 6.10 not quite right

Tom Hughes tom at compton.nu
Sun Nov 26 18:04:54 GMT 2000


I finally got around to merging 6.10, 6.11 and 6.12 into my CVS tree
and reviewing the changes and the OSMemory change in 6.10 looks a bit
wrong to me.

Rather than removing the _ between OS and Memory, it should have been
moved after the memory to give OSMemory_Flags and OSMemory_TypeFlags
which would then match the actual type definition.

The attached patch fixes this.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
...Enjoy your life; be pleasant and gay, like the birds in May.
-------------- next part --------------
Index: OS
===================================================================
RCS file: /home/cvs/riscos/oslib/Source/Core/OS,v
retrieving revision 1.4
diff -c -r1.4 OS
***************
*** 2010,2035 ****

  TYPE OSMemory_Flags = .Bits;
  CONST
!    OSMemory_GivenPageNo    = OSMemoryFlags: %100000000,
!    OSMemory_GivenLogAddr   = OSMemoryFlags: %1000000000,
!    OSMemory_GivenPhysAddr  = OSMemoryFlags: %10000000000,
!    OSMemory_ReturnPageNo   = OSMemoryFlags: %100000000000,
!    OSMemory_ReturnLogAddr  = OSMemoryFlags: %1000000000000,
!    OSMemory_ReturnPhysAddr = OSMemoryFlags: %10000000000000,
!    OSMemory_Cache          = OSMemoryFlags: %1100000000000000,
     OSMemory_CacheShift     = .Int: 14,
!    OSMemory_CacheDisable   = OSMemoryFlags: 2,
!    OSMemory_CacheEnable    = OSMemoryFlags: 3;

  TYPE OSMemory_TypeFlags = .Bits;
  CONST
!    OSMemory_Type       = OSMemoryTypeFlags: %111100000000,
     OSMemory_TypeShift  = .Int: 8,
!    OSMemory_TypeAbsent = OSMemoryTypeFlags: 0,
!    OSMemory_TypeDRAM   = OSMemoryTypeFlags: 1,
!    OSMemory_TypeVRAM   = OSMemoryTypeFlags: 2,
!    OSMemory_TypeROM    = OSMemoryTypeFlags: 3,
!    OSMemory_TypeIO     = OSMemoryTypeFlags: 4;

  TYPE OSMemory_ControllerFlags = .Bits;
  CONST
--- 2010,2035 ----

  TYPE OSMemory_Flags = .Bits;
  CONST
!    OSMemory_GivenPageNo    = OSMemory_Flags: %100000000,
!    OSMemory_GivenLogAddr   = OSMemory_Flags: %1000000000,
!    OSMemory_GivenPhysAddr  = OSMemory_Flags: %10000000000,
!    OSMemory_ReturnPageNo   = OSMemory_Flags: %100000000000,
!    OSMemory_ReturnLogAddr  = OSMemory_Flags: %1000000000000,
!    OSMemory_ReturnPhysAddr = OSMemory_Flags: %10000000000000,
!    OSMemory_Cache          = OSMemory_Flags: %1100000000000000,
     OSMemory_CacheShift     = .Int: 14,
!    OSMemory_CacheDisable   = OSMemory_Flags: 2,
!    OSMemory_CacheEnable    = OSMemory_Flags: 3;

  TYPE OSMemory_TypeFlags = .Bits;
  CONST
!    OSMemory_Type       = OSMemory_TypeFlags: %111100000000,
     OSMemory_TypeShift  = .Int: 8,
!    OSMemory_TypeAbsent = OSMemory_TypeFlags: 0,
!    OSMemory_TypeDRAM   = OSMemory_TypeFlags: 1,
!    OSMemory_TypeVRAM   = OSMemory_TypeFlags: 2,
!    OSMemory_TypeROM    = OSMemory_TypeFlags: 3,
!    OSMemory_TypeIO     = OSMemory_TypeFlags: 4;

  TYPE OSMemory_ControllerFlags = .Bits;
  CONST


More information about the oslib-team mailing list