Home | History | Annotate | Download | only in drm

Lines Matching refs:agp_hooks

50 } agp_hooks __cacheline_aligned;
56 mutex_init(&agp_hooks.lock, MUTEX_DEFAULT, IPL_NONE);
57 cv_init(&agp_hooks.cv, "agphooks");
58 agp_hooks.refcnt = 0;
59 agp_hooks.hooks = NULL;
66 KASSERT(agp_hooks.hooks == NULL);
67 KASSERT(agp_hooks.refcnt == 0);
68 cv_destroy(&agp_hooks.cv);
69 mutex_destroy(&agp_hooks.lock);
77 mutex_enter(&agp_hooks.lock);
78 if (agp_hooks.refcnt) {
79 KASSERT(agp_hooks.hooks);
82 agp_hooks.refcnt++;
83 agp_hooks.hooks = hooks;
85 mutex_exit(&agp_hooks.lock);
95 mutex_enter(&agp_hooks.lock);
96 KASSERT(agp_hooks.hooks == hooks);
97 if (agp_hooks.refcnt > 1) {
100 agp_hooks.refcnt = 0;
101 agp_hooks.hooks = NULL;
103 mutex_exit(&agp_hooks.lock);
113 mutex_enter(&agp_hooks.lock);
114 if (agp_hooks.refcnt == 0) {
117 KASSERT(agp_hooks.refcnt < UINT_MAX);
118 agp_hooks.refcnt++;
119 hooks = agp_hooks.hooks;
121 mutex_exit(&agp_hooks.lock);
130 mutex_enter(&agp_hooks.lock);
131 KASSERT(agp_hooks.hooks == hooks);
132 KASSERT(agp_hooks.refcnt);
133 if (--agp_hooks.refcnt == 0)
134 cv_broadcast(&agp_hooks.cv);
135 mutex_exit(&agp_hooks.lock);