Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-camera-slsdetector
Commits
866e8c8c
Commit
866e8c8c
authored
May 27, 2021
by
operator for beamline
Committed by
Alejandro Homs Puron
Jun 15, 2021
Browse files
Buffer: AcqThread does not wait for Lima buffer if stopped
parent
76ad86e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/SlsDetectorBuffer.h
View file @
866e8c8c
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
void
setAcqBufferCPUAffinity
(
CPUAffinity
buffer_affinity
);
void
setAcqBufferCPUAffinity
(
CPUAffinity
buffer_affinity
);
void
waitLimaFrame
(
FrameType
frame_nb
,
AutoMutex
&
l
);
bool
waitLimaFrame
(
FrameType
frame_nb
,
AutoMutex
&
l
);
char
*
getAcqFrameBufferPtr
(
FrameType
frame_nb
);
char
*
getAcqFrameBufferPtr
(
FrameType
frame_nb
);
BufferCtrlObj
*
getBufferCtrlObj
()
BufferCtrlObj
*
getBufferCtrlObj
()
...
...
src/SlsDetectorBuffer.cpp
View file @
866e8c8c
...
@@ -43,22 +43,20 @@ void BufferMgr::setLimaBufferCtrlObj(BufferCtrlObj *buffer_ctrl_obj)
...
@@ -43,22 +43,20 @@ void BufferMgr::setLimaBufferCtrlObj(BufferCtrlObj *buffer_ctrl_obj)
buffer_ctrl_obj
->
getBufferSync
(
m_cond
)
:
NULL
;
buffer_ctrl_obj
->
getBufferSync
(
m_cond
)
:
NULL
;
}
}
void
BufferMgr
::
waitLimaFrame
(
FrameType
frame_nb
,
AutoMutex
&
l
)
bool
BufferMgr
::
waitLimaFrame
(
FrameType
frame_nb
,
AutoMutex
&
l
)
{
{
DEB_MEMBER_FUNCT
();
DEB_MEMBER_FUNCT
();
if
(
!
m_lima_buffer_ctrl_obj
)
if
(
!
m_lima_buffer_ctrl_obj
)
THROW_HW_ERROR
(
Error
)
<<
"No Lima BufferCbMgr defined"
;
THROW_HW_ERROR
(
Error
)
<<
"No Lima BufferCbMgr defined"
;
while
(
true
)
{
BufferSync
::
Status
status
=
m_lima_buffer_sync
->
wait
(
frame_nb
);
BufferSync
::
Status
status
=
m_lima_buffer_sync
->
wait
(
frame_nb
);
switch
(
status
)
{
switch
(
status
)
{
case
BufferSync
::
AVAILABLE
:
case
BufferSync
::
AVAILABLE
:
return
true
;
return
;
case
BufferSync
::
INTERRUPTED
:
case
BufferSync
::
INTERRUPTED
:
return
false
;
continue
;
default:
default:
THROW_HW_ERROR
(
Error
)
<<
"Lima buffer sync wait error: "
THROW_HW_ERROR
(
Error
)
<<
"Lima buffer sync wait error: "
<<
status
;
<<
status
;
}
}
}
}
}
...
...
src/SlsDetectorCamera.cpp
View file @
866e8c8c
...
@@ -206,7 +206,11 @@ void Camera::AcqThread::threadFunction()
...
@@ -206,7 +206,11 @@ void Camera::AcqThread::threadFunction()
}
}
if
((
frame
==
-
1
)
||
(
m_state
==
StopReq
))
if
((
frame
==
-
1
)
||
(
m_state
==
StopReq
))
break
;
break
;
m_cam
->
m_buffer
.
waitLimaFrame
(
frame
,
l
);
while
(
m_state
!=
StopReq
)
if
(
m_cam
->
m_buffer
.
waitLimaFrame
(
frame
,
l
))
break
;
if
(
m_state
==
StopReq
)
break
;
{
{
AutoMutexUnlock
u
(
l
);
AutoMutexUnlock
u
(
l
);
Status
status
=
newFrameReady
(
frame
);
Status
status
=
newFrameReady
(
frame
);
...
...
Write
Preview
Supports
Markdown
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