Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
744486e5
Commit
744486e5
authored
Feb 23, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activex: use events iso semaphore
parent
ecfea08f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
projects/activex/connectioncontainer.cpp
projects/activex/connectioncontainer.cpp
+4
-13
No files found.
projects/activex/connectioncontainer.cpp
View file @
744486e5
...
@@ -107,14 +107,7 @@ public:
...
@@ -107,14 +107,7 @@ public:
static
void
ConditionInit
(
HANDLE
*
handle
)
static
void
ConditionInit
(
HANDLE
*
handle
)
{
{
/* *handle = CreateEvent(NULL, TRUE, FALSE, NULL);
*
handle
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
*/
*
handle
=
CreateSemaphore
(
NULL
,
// default security attributes
0
,
// initial count
1
,
// maximum count
NULL
);
// unnamed semaphore
if
(
*
handle
==
NULL
)
if
(
*
handle
==
NULL
)
abort
();
abort
();
}
}
...
@@ -130,20 +123,18 @@ static void ConditionWait(HANDLE *handle, CRITICAL_SECTION *lock)
...
@@ -130,20 +123,18 @@ static void ConditionWait(HANDLE *handle, CRITICAL_SECTION *lock)
do
{
do
{
LeaveCriticalSection
(
lock
);
LeaveCriticalSection
(
lock
);
dwWaitResult
=
WaitForSingleObject
(
*
handle
,
INFINITE
);
dwWaitResult
=
WaitForSingleObjectEx
(
*
handle
,
INFINITE
,
TRUE
);
//dwWaitResult = WaitForSingleObjectEx(*handle, INFINITE, TRUE);
EnterCriticalSection
(
lock
);
EnterCriticalSection
(
lock
);
}
while
(
dwWaitResult
==
WAIT_IO_COMPLETION
);
}
while
(
dwWaitResult
==
WAIT_IO_COMPLETION
);
assert
(
dwWaitResult
!=
WAIT_ABANDONED
);
/* another thread failed to cleanup! */
assert
(
dwWaitResult
!=
WAIT_ABANDONED
);
/* another thread failed to cleanup! */
assert
(
dwWaitResult
!=
WAIT_FAILED
);
assert
(
dwWaitResult
!=
WAIT_FAILED
);
//
ResetEvent(*handle);
ResetEvent
(
*
handle
);
}
}
static
void
ConditionSignal
(
HANDLE
*
handle
)
static
void
ConditionSignal
(
HANDLE
*
handle
)
{
{
//SetEvent(*handle);
SetEvent
(
*
handle
);
ReleaseSemaphore
(
*
handle
,
1L
,
NULL
);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment