 import Darwin
 import Foundation
 
+//--------------------------------------------------------------------------
+// MARK: PUBLIC GLOBAL PROPERTIES
+//--------------------------------------------------------------------------
+
+// As defined in <mach/machine.h>
+
+/// Assuming this is interpreted as unknown for now
+public let CPU_TYPE_ANY       : cpu_type_t = -1
+public let CPU_TYPE_X86       : cpu_type_t = 7
+public let CPU_TYPE_I386      : cpu_type_t = CPU_TYPE_X86   // For compatibility
+public let CPU_TYPE_X86_64    : cpu_type_t = CPU_TYPE_X86 | CPU_ARCH_ABI64
+public let CPU_TYPE_ARM       : cpu_type_t = 12
+public let CPU_TYPE_ARM64     : cpu_type_t = CPU_TYPE_ARM | CPU_ARCH_ABI64
+public let CPU_TYPE_POWERPC   : cpu_type_t = 18
+public let CPU_TYPE_POWERPC64 : cpu_type_t = CPU_TYPE_POWERPC | CPU_ARCH_ABI64
+
+
 /// Process information
 public struct ProcessInfo {
+    
     let pid     : Int
     let ppid    : Int
     let pgid    : Int
     let uid     : Int
     let command : String
+    /// What architecture was this process compiled for?
+    let arch    : cpu_type_t
     /// sys/proc.h - SIDL, SRUN, SSLEEP, SSTOP, SZOMB
-    var status  : Int
+    var status  : Int32
     
     
     public init(pid: Int, ppid: Int, pgid: Int, uid: Int, command: String,
-                                                           status: Int) {
+                                                             arch: cpu_type_t,
+                                                           status: Int32) {
         self.pid     = pid
         self.ppid    = ppid
         self.pgid    = pgid
         self.uid     = uid
         self.command = command
+        self.arch    = arch
         self.status  = status
     }
 }

                if kinfoProc.p_comm.15 > 0 { procCommand.append(Character(UnicodeScalar(Int(kinfoProc.p_comm.15)))) }
                if kinfoProc.p_comm.16 > 0 { procCommand.append(Character(UnicodeScalar(Int(kinfoProc.p_comm.16)))) }

                println("PID: \(pid); \(procCommand); " +
                        "PPID: \(kinfoProc.e_ppid); " +
                        "PGID: \(kinfoProc.e_pgid); " +
                        "UID: \(kinfoProc.uid); " +
                        "STATUS: \(kinfoProc.p_stat)")
                
                var machTask = machTaskBasicInfo(process)
                

                                                     p_comm: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                                                     e_ppid: 0,
                                                     e_pgid: 0,
                                                        uid: 0)
                kinfo_for_pid(pid, &kinfoProc)
                
                
