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
29 VideoPortCreateSpinLock(
30 IN PVOID HwDeviceExtension
,
31 OUT PSPIN_LOCK
*SpinLock
)
33 TRACE_(VIDEOPRT
, "VideoPortCreateSpinLock\n");
34 *SpinLock
= ExAllocatePool(NonPagedPool
, sizeof(KSPIN_LOCK
));
35 if (*SpinLock
== NULL
)
36 return ERROR_NOT_ENOUGH_MEMORY
;
37 KeInitializeSpinLock((PKSPIN_LOCK
)*SpinLock
);
46 VideoPortDeleteSpinLock(
47 IN PVOID HwDeviceExtension
,
48 IN PSPIN_LOCK SpinLock
)
50 TRACE_(VIDEOPRT
, "VideoPortDeleteSpinLock\n");
60 VideoPortAcquireSpinLock(
61 IN PVOID HwDeviceExtension
,
62 IN PSPIN_LOCK SpinLock
,
65 TRACE_(VIDEOPRT
, "VideoPortAcquireSpinLock\n");
66 KeAcquireSpinLock((PKSPIN_LOCK
)SpinLock
, OldIrql
);
74 VideoPortAcquireSpinLockAtDpcLevel(
75 IN PVOID HwDeviceExtension
,
76 IN PSPIN_LOCK SpinLock
)
78 TRACE_(VIDEOPRT
, "VideoPortAcquireSpinLockAtDpcLevel\n");
79 KeAcquireSpinLockAtDpcLevel((PKSPIN_LOCK
)SpinLock
);
87 VideoPortReleaseSpinLock(
88 IN PVOID HwDeviceExtension
,
89 IN PSPIN_LOCK SpinLock
,
92 TRACE_(VIDEOPRT
, "VideoPortReleaseSpinLock\n");
93 KeReleaseSpinLock((PKSPIN_LOCK
)SpinLock
, NewIrql
);
101 VideoPortReleaseSpinLockFromDpcLevel(
102 IN PVOID HwDeviceExtension
,
103 IN PSPIN_LOCK SpinLock
)
105 TRACE_(VIDEOPRT
, "VideoPortReleaseSpinLockFromDpcLevel\n");
106 KeReleaseSpinLockFromDpcLevel((PKSPIN_LOCK
)SpinLock
);