4 * Copyright (C) 2002, 2003, 2004 ReactOS Team
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32 VideoPortCreateSpinLock(
33 IN PVOID HwDeviceExtension
,
34 OUT PSPIN_LOCK
*SpinLock
)
36 TRACE_(VIDEOPRT
, "VideoPortCreateSpinLock\n");
37 *SpinLock
= ExAllocatePool(NonPagedPool
, sizeof(KSPIN_LOCK
));
38 if (*SpinLock
== NULL
)
39 return ERROR_NOT_ENOUGH_MEMORY
;
40 KeInitializeSpinLock((PKSPIN_LOCK
)*SpinLock
);
49 VideoPortDeleteSpinLock(
50 IN PVOID HwDeviceExtension
,
51 IN PSPIN_LOCK SpinLock
)
53 TRACE_(VIDEOPRT
, "VideoPortDeleteSpinLock\n");
63 VideoPortAcquireSpinLock(
64 IN PVOID HwDeviceExtension
,
65 IN PSPIN_LOCK SpinLock
,
68 TRACE_(VIDEOPRT
, "VideoPortAcquireSpinLock\n");
69 KeAcquireSpinLock((PKSPIN_LOCK
)SpinLock
, OldIrql
);
77 VideoPortAcquireSpinLockAtDpcLevel(
78 IN PVOID HwDeviceExtension
,
79 IN PSPIN_LOCK SpinLock
)
81 TRACE_(VIDEOPRT
, "VideoPortAcquireSpinLockAtDpcLevel\n");
82 KeAcquireSpinLockAtDpcLevel((PKSPIN_LOCK
)SpinLock
);
90 VideoPortReleaseSpinLock(
91 IN PVOID HwDeviceExtension
,
92 IN PSPIN_LOCK SpinLock
,
95 TRACE_(VIDEOPRT
, "VideoPortReleaseSpinLock\n");
96 KeReleaseSpinLock((PKSPIN_LOCK
)SpinLock
, NewIrql
);
104 VideoPortReleaseSpinLockFromDpcLevel(
105 IN PVOID HwDeviceExtension
,
106 IN PSPIN_LOCK SpinLock
)
108 TRACE_(VIDEOPRT
, "VideoPortReleaseSpinLockFromDpcLevel\n");
109 KeReleaseSpinLockFromDpcLevel((PKSPIN_LOCK
)SpinLock
);