Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Esteban Blanc
proview
Commits
151dd4bd
Commit
151dd4bd
authored
Apr 30, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed error handling so that sporadic error are allowed and does not cause system to halt
parent
e07f87d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
+13
-2
No files found.
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
View file @
151dd4bd
/*
/*
* Proview $Id: rt_io_m_ai_ai32up.c,v 1.
5 2006-09-05 12:03:01
claes Exp $
* Proview $Id: rt_io_m_ai_ai32up.c,v 1.
6 2007-04-30 12:14:03
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -58,6 +58,7 @@ typedef struct {
...
@@ -58,6 +58,7 @@ typedef struct {
int
Qbus_fp
;
int
Qbus_fp
;
unsigned
int
bfb_item
;
unsigned
int
bfb_item
;
int
ScanCount
[
IO_MAXCHAN
];
int
ScanCount
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
}
io_sLocal
;
}
io_sLocal
;
static
pwr_tStatus
AiRangeToCoef
(
static
pwr_tStatus
AiRangeToCoef
(
...
@@ -183,6 +184,7 @@ static pwr_tStatus IoCardRead (
...
@@ -183,6 +184,7 @@ static pwr_tStatus IoCardRead (
int
sts
;
int
sts
;
qbus_io_read
rb
;
qbus_io_read
rb
;
int
bfb_error
=
0
;
int
bfb_error
=
0
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ai_AI32uP
*
)
cp
->
op
;
op
=
(
pwr_sClass_Ai_AI32uP
*
)
cp
->
op
;
...
@@ -264,7 +266,16 @@ static pwr_tStatus IoCardRead (
...
@@ -264,7 +266,16 @@ static pwr_tStatus IoCardRead (
}
}
#endif
#endif
/* Increase error count and check error limits */
/* Increase error count and check error limits */
clock_gettime
(
CLOCK_REALTIME
,
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
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