Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
2da54573
Commit
2da54573
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Misc cleanup
parent
90880464
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llcommon/llqueuedthread.cpp
+7
-11
7 additions, 11 deletions
indra/llcommon/llqueuedthread.cpp
indra/llcommon/llthread.cpp
+3
-3
3 additions, 3 deletions
indra/llcommon/llthread.cpp
with
10 additions
and
14 deletions
indra/llcommon/llqueuedthread.cpp
+
7
−
11
View file @
2da54573
...
@@ -126,8 +126,6 @@ S32 LLQueuedThread::update(F32 max_time_ms)
...
@@ -126,8 +126,6 @@ S32 LLQueuedThread::update(F32 max_time_ms)
S32
LLQueuedThread
::
updateQueue
(
F32
max_time_ms
)
S32
LLQueuedThread
::
updateQueue
(
F32
max_time_ms
)
{
{
F64
max_time
=
(
F64
)
max_time_ms
*
.001
;
LLTimer
timer
;
S32
pending
=
1
;
S32
pending
=
1
;
// Frame Update
// Frame Update
...
@@ -141,6 +139,8 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
...
@@ -141,6 +139,8 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
}
}
else
else
{
{
F64
max_time
=
(
F64
)
max_time_ms
*
.001
;
LLTimer
timer
;
while
(
pending
>
0
)
while
(
pending
>
0
)
{
{
pending
=
processNextRequest
();
pending
=
processNextRequest
();
...
@@ -154,19 +154,16 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
...
@@ -154,19 +154,16 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
void
LLQueuedThread
::
incQueue
()
void
LLQueuedThread
::
incQueue
()
{
{
// Something has been added to the queue
// Something has been added to the queue
if
(
!
isPaused
())
if
(
mThreaded
&&
!
isPaused
())
{
{
if
(
mThreaded
)
wake
();
// Wake the thread up if necessary.
{
wake
();
// Wake the thread up if necessary.
}
}
}
}
}
// MAIN thread
// MAIN thread
void
LLQueuedThread
::
waitOnPending
()
void
LLQueuedThread
::
waitOnPending
()
{
{
while
(
1
)
while
(
true
)
{
{
update
(
0
);
update
(
0
);
...
@@ -179,7 +176,6 @@ void LLQueuedThread::waitOnPending()
...
@@ -179,7 +176,6 @@ void LLQueuedThread::waitOnPending()
yield
();
yield
();
}
}
}
}
return
;
}
}
// MAIN thread
// MAIN thread
...
@@ -204,7 +200,7 @@ LLQueuedThread::handle_t LLQueuedThread::generateHandle()
...
@@ -204,7 +200,7 @@ LLQueuedThread::handle_t LLQueuedThread::generateHandle()
lockData
();
lockData
();
while
((
mNextHandle
==
nullHandle
())
||
(
mRequestHash
.
find
(
mNextHandle
)))
while
((
mNextHandle
==
nullHandle
())
||
(
mRequestHash
.
find
(
mNextHandle
)))
{
{
mNextHandle
++
;
++
mNextHandle
;
}
}
const
LLQueuedThread
::
handle_t
res
=
mNextHandle
++
;
const
LLQueuedThread
::
handle_t
res
=
mNextHandle
++
;
unlockData
();
unlockData
();
...
@@ -396,7 +392,7 @@ S32 LLQueuedThread::processNextRequest()
...
@@ -396,7 +392,7 @@ S32 LLQueuedThread::processNextRequest()
// Get next request from pool
// Get next request from pool
lockData
();
lockData
();
while
(
1
)
while
(
true
)
{
{
req
=
NULL
;
req
=
NULL
;
if
(
mRequestQueue
.
empty
())
if
(
mRequestQueue
.
empty
())
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llthread.cpp
+
3
−
3
View file @
2da54573
...
@@ -54,12 +54,12 @@ typedef struct tagTHREADNAME_INFO
...
@@ -54,12 +54,12 @@ typedef struct tagTHREADNAME_INFO
}
THREADNAME_INFO
;
}
THREADNAME_INFO
;
#pragma pack(pop)
#pragma pack(pop)
void
set_thread_name
(
DWORD
dwThreadID
,
const
char
*
threadName
)
void
set_thread_name
(
const
char
*
threadName
)
{
{
THREADNAME_INFO
info
;
THREADNAME_INFO
info
;
info
.
dwType
=
0x1000
;
info
.
dwType
=
0x1000
;
info
.
szName
=
threadName
;
info
.
szName
=
threadName
;
info
.
dwThreadID
=
dwThreadID
;
info
.
dwThreadID
=
(
DWORD
)
-
1
;
info
.
dwFlags
=
0
;
info
.
dwFlags
=
0
;
__try
__try
...
@@ -132,7 +132,7 @@ void LLThread::registerThreadID() {}
...
@@ -132,7 +132,7 @@ void LLThread::registerThreadID() {}
void
LLThread
::
threadRun
()
void
LLThread
::
threadRun
()
{
{
#ifdef LL_WINDOWS
#ifdef LL_WINDOWS
set_thread_name
(
-
1
,
mName
.
c_str
());
set_thread_name
(
mName
.
c_str
());
#endif
#endif
// this is the first point at which we're actually running in the new thread
// this is the first point at which we're actually running in the new thread
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment