-#define is_user_thread(ThrAct) \
- ((USER_REGS(ThrAct)->efl & EFL_VM) \
- || ((USER_REGS(ThrAct)->cs & 0x03) != 0))
+ struct pal_pcb pal_pcb;
+ uint32_t specFlags;
+ /* N.B.: These "specFlags" are read-modify-written non-atomically within
+ * the copyio routine. So conceivably any exception that modifies the
+ * flags in a persistent manner could be clobbered if it occurs within
+ * a copyio context. For now, the only other flag here is OnProc which
+ * is not modified except at context switch.
+ */
+#define OnProc 0x1
+#define CopyIOActive 0x2 /* Checked to ensure DTrace actions do not re-enter copyio(). */
+ uint64_t thread_gpu_ns;
+#if NCOPY_WINDOWS > 0
+ struct {
+ user_addr_t user_base;
+ } copy_window[NCOPY_WINDOWS];
+ int nxt_window;
+ int copyio_state;
+#define WINDOWS_DIRTY 0
+#define WINDOWS_CLEAN 1
+#define WINDOWS_CLOSED 2
+#define WINDOWS_OPENED 3
+ uint64_t physwindow_pte;
+ int physwindow_busy;
+#endif
+};
+typedef struct machine_thread *pcb_t;