1. 13 Nov, 2009 13 commits
  2. 09 Nov, 2009 1 commit
  3. 06 Nov, 2009 1 commit
    • David Brownell's avatar
      target: provide container_of() · db116b1e
      David Brownell authored
      
      
      Provide a cleaner way to handle single inheritance of targets
      in C, using the same model Linux does:  structs containing other
      structs, un-nested via calls to a "container_of()" macro that
      are packaged in typesafe inline functions.
      
      Targets already use this containment idiom, but make it much
      more complicated because they un-nest using embedded "void *"
      pointers ... in chains of up to five per target, which is all
      pure needless complication.  (Example: arm92x core, arm9tdmi,
      arm7_9, armv4_5 ... on top of the base "target" class.)
      
      Applying this scheme consistently simplifies things, and gets
      rid of many error-prone untyped pointers.  It won't change any
      part of the type model though -- it just simplifies things.
      (And facilitates more cleanup later on.)
      
      Rule of thumb:  where there's an X->arch_info void* pointer,
      access to that pointer can and should be removed.  It may be
      convenient to set up pointers to some of the embedded structs;
      and shrink their current "*_common" names (annoyingly long).
      
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      db116b1e
  4. 03 Nov, 2009 1 commit
  5. 23 Oct, 2009 1 commit
  6. 21 Oct, 2009 1 commit
  7. 12 Oct, 2009 1 commit
  8. 08 Oct, 2009 1 commit
  9. 21 Sep, 2009 1 commit
  10. 30 Aug, 2009 1 commit
  11. 17 Jul, 2009 1 commit
  12. 28 Jun, 2009 1 commit
  13. 23 Jun, 2009 3 commits
  14. 18 Jun, 2009 3 commits
  15. 03 Jun, 2009 1 commit
  16. 31 May, 2009 9 commits