+static inline struct stw_context *
+stw_lookup_context_locked( DHGLRC dhglrc )
+{
+ if (dhglrc == 0 || stw_dev == NULL)
+ return NULL;
+ return (struct stw_context *) handle_table_get(stw_dev->ctx_table, dhglrc);
+}
+
+
+static inline void
+stw_lock_contexts(struct stw_device *stw_dev)
+{
+ EnterCriticalSection(&stw_dev->ctx_mutex);
+}
+
+
+static inline void
+stw_unlock_contexts(struct stw_device *stw_dev)
+{
+ LeaveCriticalSection(&stw_dev->ctx_mutex);
+}
+
+