TSSRT and TSRIST outputs in listen mode will now request not to be killed by the Comms library, since they handle multiple users
This commit is contained in:
parent
22e0036b8b
commit
41cf557b48
7 changed files with 11 additions and 5 deletions
|
@ -17,6 +17,7 @@ namespace Comms{
|
|||
uint8_t sessionUnspecifiedMode = 0;
|
||||
uint8_t sessionStreamInfoMode = SESS_DEFAULT_STREAM_INFO_MODE;
|
||||
uint8_t tknMode = SESS_TKN_DEFAULT_MODE;
|
||||
uint8_t defaultCommFlags = 0;
|
||||
|
||||
/// \brief Refreshes the session configuration if the last update was more than 5 seconds ago
|
||||
void sessionConfigCache(){
|
||||
|
@ -103,7 +104,7 @@ namespace Comms{
|
|||
for (size_t i = 0; i < recordCount(); i++){
|
||||
if (getStatus(i) == COMM_STATUS_INVALID || (getStatus(i) & COMM_STATUS_DISCONNECT)){continue;}
|
||||
uint64_t cPid = getPid(i);
|
||||
if (cPid > 1){
|
||||
if (cPid > 1 && !(getStatus(i) & COMM_STATUS_NOKILL)){
|
||||
Util::Procs::Stop(cPid); // soft kill
|
||||
keepGoing = true;
|
||||
}
|
||||
|
@ -164,7 +165,7 @@ namespace Comms{
|
|||
IPC::semGuard G(&sem);
|
||||
if (getStatus() != COMM_STATUS_INVALID){continue;}
|
||||
nullFields();
|
||||
setStatus(COMM_STATUS_ACTIVE);
|
||||
setStatus(COMM_STATUS_ACTIVE | defaultCommFlags);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +276,7 @@ namespace Comms{
|
|||
if (dataPage){
|
||||
setTrack(idx);
|
||||
setKeyNum(0);
|
||||
setStatus(initialState);
|
||||
setStatus(initialState | defaultCommFlags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Comms{
|
|||
extern uint8_t sessionUnspecifiedMode;
|
||||
extern uint8_t sessionStreamInfoMode;
|
||||
extern uint8_t tknMode;
|
||||
extern uint8_t defaultCommFlags;
|
||||
void sessionConfigCache();
|
||||
|
||||
class Comms{
|
||||
|
|
|
@ -291,6 +291,7 @@ static inline void show_stackframe(){}
|
|||
#define COMM_STATUS_DONOTTRACK 0x40
|
||||
#define COMM_STATUS_DISCONNECT 0x20
|
||||
#define COMM_STATUS_REQDISCONNECT 0x10
|
||||
#define COMM_STATUS_NOKILL 0x8
|
||||
#define COMM_STATUS_ACTIVE 0x1
|
||||
#define COMM_STATUS_INVALID 0x0
|
||||
#define SESS_BUNDLE_DEFAULT_VIEWER 14
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue