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
43c980a2
Commit
43c980a2
authored
Sep 13, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed rt_prio, it was just a copy of the standard 'chrt' unix command.
parent
be0fe173
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
21 additions
and
431 deletions
+21
-431
src/exe/rt_prio/src/os_templ/hw_templ/makefile
src/exe/rt_prio/src/os_templ/hw_templ/makefile
+0
-15
src/exe/rt_prio/src/rt_prio.c
src/exe/rt_prio/src/rt_prio.c
+0
-220
src/exp/rt/src/rt_plc_process.c
src/exp/rt/src/rt_plc_process.c
+0
-1
src/lib/rt/src/os_cygwin/rt_proc.c
src/lib/rt/src/os_cygwin/rt_proc.c
+1
-24
src/lib/rt/src/os_freebsd/rt_proc.c
src/lib/rt/src/os_freebsd/rt_proc.c
+1
-24
src/lib/rt/src/os_linux/rt_proc.c
src/lib/rt/src/os_linux/rt_proc.c
+1
-24
src/lib/rt/src/os_macos/rt_proc.c
src/lib/rt/src/os_macos/rt_proc.c
+1
-24
src/lib/rt/src/os_openbsd/rt_proc.c
src/lib/rt/src/os_openbsd/rt_proc.c
+1
-24
src/lib/rt/src/os_templ/rt_proc.c
src/lib/rt/src/os_templ/rt_proc.c
+1
-24
src/lib/rt/src/rt_c_node.c
src/lib/rt/src/rt_c_node.c
+1
-1
src/lib/rt/src/rt_ini_load.c
src/lib/rt/src/rt_ini_load.c
+7
-4
src/lib/rt/src/rt_proc.h
src/lib/rt/src/rt_proc.h
+0
-1
src/tools/pkg/cygwin/pwrrt/postinst
src/tools/pkg/cygwin/pwrrt/postinst
+0
-2
src/tools/pkg/deb/pwrrt/postinst
src/tools/pkg/deb/pwrrt/postinst
+0
-2
src/tools/pkg/deb/pwrsev/build.sh
src/tools/pkg/deb/pwrsev/build.sh
+1
-1
src/tools/pkg/deb/pwrsev/postinst
src/tools/pkg/deb/pwrsev/postinst
+0
-2
src/tools/pkg/deb_armel/pwrrt/postinst
src/tools/pkg/deb_armel/pwrrt/postinst
+0
-2
src/tools/pkg/deb_x86_64/pwrrt/postinst
src/tools/pkg/deb_x86_64/pwrrt/postinst
+0
-2
src/tools/pkg/deb_x86_64/pwrsev/build.sh
src/tools/pkg/deb_x86_64/pwrsev/build.sh
+1
-1
src/tools/pkg/deb_x86_64/pwrsev/postinst
src/tools/pkg/deb_x86_64/pwrsev/postinst
+0
-2
src/tools/pkg/openbsd/pwrrt/postinst
src/tools/pkg/openbsd/pwrrt/postinst
+0
-2
src/tools/pkg/raspbian/pwrrt/postinst
src/tools/pkg/raspbian/pwrrt/postinst
+0
-2
src/tools/pkg/raspbian/pwrsev/build.sh
src/tools/pkg/raspbian/pwrsev/build.sh
+1
-1
src/tools/pkg/raspbian/pwrsev/postinst
src/tools/pkg/raspbian/pwrsev/postinst
+0
-2
src/tools/pkg/rpm/pwrrt/pwrrt.spec
src/tools/pkg/rpm/pwrrt/pwrrt.spec
+0
-2
src/tools/pkg/rpm/pwrsev/build.sh
src/tools/pkg/rpm/pwrsev/build.sh
+1
-1
src/tools/pkg/rpm/pwrsev/pwrsev.spec
src/tools/pkg/rpm/pwrsev/pwrsev.spec
+0
-2
src/tools/pkg/suse/pwrrt/pwrrt.spec
src/tools/pkg/suse/pwrrt/pwrrt.spec
+0
-2
src/tools/pkg/suse/pwrsev/build.sh
src/tools/pkg/suse/pwrsev/build.sh
+1
-1
src/tools/pkg/suse/pwrsev/pwrsev.spec
src/tools/pkg/suse/pwrsev/pwrsev.spec
+0
-2
src/tools/pkg/ubu/pwrrt/postinst
src/tools/pkg/ubu/pwrrt/postinst
+0
-2
src/tools/pkg/ubu/pwrsev/build.sh
src/tools/pkg/ubu/pwrsev/build.sh
+1
-1
src/tools/pkg/ubu/pwrsev/postinst
src/tools/pkg/ubu/pwrsev/postinst
+0
-2
src/tools/pkg/ubu_x86_64/pwrrt/postinst
src/tools/pkg/ubu_x86_64/pwrrt/postinst
+0
-2
src/tools/pkg/ubu_x86_64/pwrsev/build.sh
src/tools/pkg/ubu_x86_64/pwrsev/build.sh
+1
-1
src/tools/pkg/ubu_x86_64/pwrsev/postinst
src/tools/pkg/ubu_x86_64/pwrsev/postinst
+0
-2
src/tools/pwre/src/os_freebsd/pwre_configure.sh
src/tools/pwre/src/os_freebsd/pwre_configure.sh
+0
-1
src/tools/pwre/src/os_macos/pwre_configure.sh
src/tools/pwre/src/os_macos/pwre_configure.sh
+0
-1
src/tools/pwre/src/os_mingw/pwre_configure.sh
src/tools/pwre/src/os_mingw/pwre_configure.sh
+0
-1
src/tools/pwre/src/os_openbsd/pwre_configure.sh
src/tools/pwre/src/os_openbsd/pwre_configure.sh
+0
-1
No files found.
src/exe/rt_prio/src/os_templ/hw_templ/makefile
deleted
100644 → 0
View file @
be0fe173
include
$(pwre_dir_symbols)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_sroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
src/exe/rt_prio/src/rt_prio.c
deleted
100644 → 0
View file @
be0fe173
/*
* chrt.c - chrt
* Command-line utility for manipulating a task's real-time attributes
*
* Robert Love <rml@tech9.net>
* 27-Apr-2002: initial version
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, v2, as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Copyright (C) 2004 Robert Love
*/
#include <errno.h>
#include <getopt.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static
void
show_usage
(
const
char
*
cmd
)
{
// fprintf(stderr, "chrt version " VERSION "\n");
fprintf
(
stderr
,
"usage: %s [options] [prio] [pid | cmd [args...]]
\n
"
,
cmd
);
fprintf
(
stderr
,
"manipulate real-time attributes of a process
\n
"
);
fprintf
(
stderr
,
" -f, --fifo "
"set policy to SCHED_FF
\n
"
);
fprintf
(
stderr
,
" -p, --pid "
"operate on existing given pid
\n
"
);
fprintf
(
stderr
,
" -m, --max "
"show min and max valid priorities
\n
"
);
fprintf
(
stderr
,
" -o, --other "
"set policy to SCHED_OTHER
\n
"
);
fprintf
(
stderr
,
" -r, --rr "
"set policy to SCHED_RR (default)
\n
"
);
fprintf
(
stderr
,
" -h, --help "
"display this help
\n
"
);
fprintf
(
stderr
,
" -v, --verbose "
"display status information
\n
"
);
// fprintf(stderr, " -V, --version "
// "output version information\n\n");
fprintf
(
stderr
,
"You must give a priority if changing policy.
\n\n
"
);
fprintf
(
stderr
,
"Report bugs and send patches to <rml@tech9.net>
\n
"
);
}
static
void
show_rt_info
(
const
char
*
what
,
pid_t
pid
)
{
struct
sched_param
sp
;
int
policy
;
/* don't display "pid 0" as that is confusing */
if
(
!
pid
)
pid
=
getpid
();
policy
=
sched_getscheduler
(
pid
);
if
(
policy
==
-
1
)
{
perror
(
"sched_getscheduler"
);
fprintf
(
stderr
,
"failed to get pid %d's policy
\n
"
,
pid
);
exit
(
1
);
}
printf
(
"pid %d's %s scheduling policy: "
,
pid
,
what
);
switch
(
policy
)
{
case
SCHED_OTHER
:
printf
(
"SCHED_OTHER
\n
"
);
break
;
case
SCHED_FIFO
:
printf
(
"SCHED_FIFO
\n
"
);
break
;
case
SCHED_RR
:
printf
(
"SCHED_RR
\n
"
);
break
;
default:
printf
(
"unknown
\n
"
);
}
if
(
sched_getparam
(
pid
,
&
sp
))
{
perror
(
"sched_getparam"
);
fprintf
(
stderr
,
"failed to get pid %d's attributes
\n
"
,
pid
);
exit
(
1
);
}
printf
(
"pid %d's %s scheduling priority: %d
\n
"
,
pid
,
what
,
sp
.
sched_priority
);
}
static
void
show_min_max
(
void
)
{
int
max
,
min
;
max
=
sched_get_priority_max
(
SCHED_FIFO
);
min
=
sched_get_priority_min
(
SCHED_FIFO
);
if
(
max
>=
0
&&
min
>=
0
)
printf
(
"SCHED_FIFO min/max priority
\t
: %d/%d
\n
"
,
min
,
max
);
else
printf
(
"SCHED_FIFO not supported?
\n
"
);
max
=
sched_get_priority_max
(
SCHED_RR
);
min
=
sched_get_priority_min
(
SCHED_RR
);
if
(
max
>=
0
&&
min
>=
0
)
printf
(
"SCHED_RR min/max priority
\t
: %d/%d
\n
"
,
min
,
max
);
else
printf
(
"SCHED_RR not supported?
\n
"
);
max
=
sched_get_priority_max
(
SCHED_OTHER
);
min
=
sched_get_priority_min
(
SCHED_OTHER
);
if
(
max
>=
0
&&
min
>=
0
)
printf
(
"SCHED_OTHER min/max priority
\t
: %d/%d
\n
"
,
min
,
max
);
else
printf
(
"SCHED_OTHER not supported?
\n
"
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
,
policy
=
SCHED_RR
,
priority
=
0
,
verbose
=
0
;
struct
sched_param
sp
;
pid_t
pid
=
0
;
struct
option
longopts
[]
=
{
{
"fifo"
,
0
,
NULL
,
'f'
},
{
"pid"
,
0
,
NULL
,
'p'
},
{
"help"
,
0
,
NULL
,
'h'
},
{
"max"
,
0
,
NULL
,
'm'
},
{
"other"
,
0
,
NULL
,
'o'
},
{
"rr"
,
0
,
NULL
,
'r'
},
{
"verbose"
,
0
,
NULL
,
'v'
},
{
"reboot"
,
0
,
NULL
,
'B'
},
// { "version", 0, NULL, 'V' },
{
NULL
,
0
,
NULL
,
0
}
};
while
((
i
=
getopt_long
(
argc
,
argv
,
"+fphmorv"
,
longopts
,
NULL
))
!=
-
1
)
{
int
ret
=
1
;
switch
(
i
)
{
case
'f'
:
policy
=
SCHED_FIFO
;
break
;
case
'm'
:
show_min_max
();
return
0
;
case
'o'
:
policy
=
SCHED_OTHER
;
break
;
case
'p'
:
errno
=
0
;
pid
=
strtol
(
argv
[
argc
-
1
],
NULL
,
10
);
if
(
errno
)
{
perror
(
"strtol"
);
fprintf
(
stderr
,
"failed to parse pid!
\n
"
);
return
1
;
}
break
;
case
'r'
:
policy
=
SCHED_RR
;
break
;
case
'v'
:
verbose
=
1
;
break
;
// case 'V':
// printf("chrt version " VERSION "\n");
// return 0;
case
'B'
:
{
int
sts
;
sts
=
system
(
"/sbin/reboot"
);
if
(
sts
!=
0
)
printf
(
"Reboot return sts: %d
\n
"
,
sts
);
return
0
;
}
case
'h'
:
ret
=
0
;
default:
show_usage
(
argv
[
0
]);
return
ret
;
}
}
if
((
pid
&&
argc
-
optind
<
1
)
||
(
!
pid
&&
argc
-
optind
<
2
))
{
show_usage
(
argv
[
0
]);
return
1
;
}
if
(
pid
&&
(
verbose
||
argc
-
optind
==
1
))
{
show_rt_info
(
"current"
,
pid
);
if
(
argc
-
optind
==
1
)
return
0
;
}
errno
=
0
;
priority
=
strtol
(
argv
[
optind
],
NULL
,
10
);
if
(
errno
)
{
perror
(
"strtol"
);
fprintf
(
stderr
,
"failed to parse priority!
\n
"
);
return
1
;
}
sp
.
sched_priority
=
priority
;
if
(
sched_setscheduler
(
pid
,
policy
,
&
sp
)
==
-
1
)
{
perror
(
"sched_setscheduler"
);
fprintf
(
stderr
,
"failed to set pid %d's policy
\n
"
,
pid
);
return
1
;
}
if
(
verbose
)
show_rt_info
(
"new"
,
pid
);
if
(
!
pid
)
{
argv
+=
optind
+
1
;
execvp
(
argv
[
0
],
argv
);
perror
(
"execvp"
);
fprintf
(
stderr
,
"failed to execute %s
\n
"
,
argv
[
0
]);
return
1
;
}
return
0
;
}
src/exp/rt/src/rt_plc_process.c
View file @
43c980a2
...
...
@@ -174,7 +174,6 @@ int main(int argc, char* argv[])
qcom_WaitAnd
(
&
sts
,
&
pp
->
eventQ
,
&
qcom_cQini
,
ini_mEvent_newPlcStart
,
qcom_cTmoEternal
);
// proc_SetPriority(pp->PlcProcess->Prio);
set_values
(
pp
);
start_threads
(
pp
);
run_threads
(
pp
);
...
...
src/lib/rt/src/os_cygwin/rt_proc.c
View file @
43c980a2
...
...
@@ -71,7 +71,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -84,29 +84,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/os_freebsd/rt_proc.c
View file @
43c980a2
...
...
@@ -73,7 +73,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -86,29 +86,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/os_linux/rt_proc.c
View file @
43c980a2
...
...
@@ -71,7 +71,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -84,29 +84,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/os_macos/rt_proc.c
View file @
43c980a2
...
...
@@ -72,7 +72,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -85,29 +85,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/os_openbsd/rt_proc.c
View file @
43c980a2
...
...
@@ -73,7 +73,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -86,29 +86,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/os_templ/rt_proc.c
View file @
43c980a2
...
...
@@ -71,7 +71,7 @@ pwr_tStatus proc_Start(proc_sProcess* p)
(
int
)
p
->
pid
,
p
->
file
);
}
}
else
{
sts
=
proc_SetPriority
(
p
->
p_prio
)
;
sts
=
PROC__SUCCESS
;
if
(
EVEN
(
sts
))
errh_Warning
(
"%s: error setprio, %m
\n
file: %s"
,
p
->
name
,
sts
,
p
->
file
);
argv
=
co_StrToArgv
(
p
->
file
,
p
->
arg
);
...
...
@@ -84,29 +84,6 @@ pwr_tStatus proc_Start(proc_sProcess* p)
return
sts
;
}
pwr_tStatus
proc_SetPriority
(
int
prio
)
{
// struct sched_param param;
// int rc;
int
pid
;
char
set
[
100
];
pwr_tStatus
sts
=
PROC__SUCCESS
;
pid
=
getpid
();
// rc = sched_getparam((pid_t)0, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// param.sched_priority = prio;
// rc = sched_setscheduler((pid_t)0, SCHED_RR, ¶m);
// if (rc != 0)
// return errno_GetStatus();
// Priorities set from rt_ini after start of all processes
sprintf
(
set
,
"rt_prio -rp %d %d"
,
prio
,
pid
);
// system(set);
return
sts
;
}
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
p
)
{
pwr_tStatus
sts
=
PROC__SUCCESS
;
...
...
src/lib/rt/src/rt_c_node.c
View file @
43c980a2
...
...
@@ -121,7 +121,7 @@ void pwrs_Node_Exec(void (*handler_event_cb)(int, int))
if
(
!
reboot_done
)
{
errh_Fatal
(
"Emergency break action: reboot"
);
sts
=
system
(
"
rt_prio --
reboot"
);
sts
=
system
(
"
/sbin/
reboot"
);
if
(
sts
!=
0
)
errh_Fatal
(
"Unable to reboot, sts %d"
,
sts
);
reboot_done
=
1
;
...
...
src/lib/rt/src/rt_ini_load.c
View file @
43c980a2
...
...
@@ -1697,11 +1697,14 @@ void ini_ProcPrio(pwr_tStatus* status, ini_sContext* cp, ini_sProc* pp)
if
(
pp
->
flags
.
b
.
run
)
{
#if defined(OS_LINUX)
char
set
[
100
];
if
(
!
(
pp
->
flags
.
b
.
plc
))
{
sprintf
(
set
,
"rt_prio -rp %d %d"
,
pp
->
proc
.
p_prio
,
pp
->
proc
.
pid
);
system
(
set
);
struct
sched_param
sp
;
sp
.
sched_priority
=
pp
->
proc
.
p_prio
;
if
(
sched_setscheduler
(
pp
->
proc
.
pid
,
SCHED_RR
,
&
sp
)
==
-
1
)
{
perror
(
"sched_setscheduler"
);
fprintf
(
stderr
,
"failed to set pid %d's policy
\n
"
,
pp
->
proc
.
pid
);
return
;
}
}
#endif
}
...
...
src/lib/rt/src/rt_proc.h
View file @
43c980a2
...
...
@@ -82,7 +82,6 @@ typedef struct {
pwr_tStatus
proc_Load
(
proc_sProcess
*
);
pwr_tStatus
proc_Start
(
proc_sProcess
*
);
pwr_tStatus
proc_SetPriority
(
int
);
pwr_tStatus
proc_UnloadProgram
(
proc_sProcess
*
);
pwr_tStatus
proc_RegisterObject
(
pwr_tOid
);
...
...
src/tools/pkg/cygwin/pwrrt/postinst
View file @
43c980a2
...
...
@@ -189,8 +189,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
#chown root /usr/pwrrt/exe/rt_prio
#chmod u+s /usr/pwrrt/exe/rt_prio
chown
root /usr/pwrrt/exe/rt_mozilla
chmod
u+s /usr/pwrrt/exe/rt_mozilla
...
...
src/tools/pkg/deb/pwrrt/postinst
View file @
43c980a2
...
...
@@ -180,8 +180,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/deb/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -146,7 +146,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
exe/sev_repair exe/
*
.gif exe/
*
.png load/pwrs.dbs load/pwrb.dbs load/sev_xtt_version_help.dat
\
exe/pwr_pkg.sh exe/rt_xtt exe/rt_xtt_gtk exe/rt_rtt exe/
*
.pwgc exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
...
...
src/tools/pkg/deb/pwrsev/postinst
View file @
43c980a2
...
...
@@ -169,8 +169,6 @@ chown -R pwrp /usr/pwrsev
chgrp
-R
pwrp /usr/pwrsev
chmod
u+s /usr/pwrsev/exe/sev_ini
chown
root /usr/pwrsev/exe/rt_prio
chmod
u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf
=
0
...
...
src/tools/pkg/deb_armel/pwrrt/postinst
View file @
43c980a2
...
...
@@ -30,8 +30,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/deb_x86_64/pwrrt/postinst
View file @
43c980a2
...
...
@@ -180,8 +180,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/deb_x86_64/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -145,7 +145,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
exe/sev_repair exe/
*
.gif exe/
*
.png load/pwrs.dbs load/pwrb.dbs load/sev_xtt_version_help.dat
\
exe/pwr_pkg.sh exe/rt_xtt exe/rt_xtt_gtk exe/rt_rtt exe/
*
.pwgc exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
...
...
src/tools/pkg/deb_x86_64/pwrsev/postinst
View file @
43c980a2
...
...
@@ -169,8 +169,6 @@ chown -R pwrp /usr/pwrsev
chgrp
-R
pwrp /usr/pwrsev
chmod
u+s /usr/pwrsev/exe/sev_ini
chown
root /usr/pwrsev/exe/rt_prio
chmod
u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf
=
0
...
...
src/tools/pkg/openbsd/pwrrt/postinst
View file @
43c980a2
...
...
@@ -189,8 +189,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
#chown root /usr/pwrrt/exe/rt_prio
#chmod u+s /usr/pwrrt/exe/rt_prio
chown
root /usr/pwrrt/exe/rt_mozilla
chmod
u+s /usr/pwrrt/exe/rt_mozilla
...
...
src/tools/pkg/raspbian/pwrrt/postinst
View file @
43c980a2
...
...
@@ -180,8 +180,6 @@ if getent group dialout > /dev/null; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/raspbian/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -146,7 +146,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
exe/sev_repair exe/
*
.gif exe/
*
.png load/pwrs.dbs load/pwrb.dbs load/sev_xtt_version_help.dat
\
exe/pwr_pkg.sh exe/rt_xtt exe/rt_xtt_gtk exe/rt_rtt exe/
*
.pwgc exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
...
...
src/tools/pkg/raspbian/pwrsev/postinst
View file @
43c980a2
...
...
@@ -169,8 +169,6 @@ chown -R pwrp /usr/pwrsev
chgrp
-R
pwrp /usr/pwrsev
chmod
u+s /usr/pwrsev/exe/sev_ini
chown
root /usr/pwrsev/exe/rt_prio
chmod
u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf
=
0
...
...
src/tools/pkg/rpm/pwrrt/pwrrt.spec
View file @
43c980a2
...
...
@@ -203,8 +203,6 @@ chmod u+s /usr/pwrrt/exe/rt_rtt
chmod u+s /usr/pwrrt/exe/rt_bck
chown root /usr/pwrrt/exe/rs_remote_alcm
chmod u+s /usr/pwrrt/exe/rs_remote_alcm
chown root /usr/pwrrt/exe/rt_prio
chmod u+s /usr/pwrrt/exe/rt_prio
chown root /usr/pwrrt/exe/rt_mozilla
chmod u+s /usr/pwrrt/exe/rt_mozilla
...
...
src/tools/pkg/rpm/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -149,7 +149,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server exe/sev_repair exe/
*
.gif exe/
*
.png exe/sev_xtt_version_help.dat exe/pwr_pkg.sh exe/en_us/
*
.txt doc/
*
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server exe/sev_repair exe/
*
.gif exe/
*
.png exe/sev_xtt_version_help.dat exe/pwr_pkg.sh exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
mkdir
cnf
tar
-xf
$tarfile
...
...
src/tools/pkg/rpm/pwrsev/pwrsev.spec
View file @
43c980a2
...
...
@@ -195,8 +195,6 @@ chown -R pwrp /usr/pwrsev
chgrp -R pwrp /usr/pwrsev
chmod u+s /usr/pwrsev/exe/sev_ini
chown root /usr/pwrsev/exe/rt_prio
chmod u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf=0
...
...
src/tools/pkg/suse/pwrrt/pwrrt.spec
View file @
43c980a2
...
...
@@ -203,8 +203,6 @@ chmod u+s /usr/pwrrt/exe/rt_rtt
chmod u+s /usr/pwrrt/exe/rt_bck
chown root /usr/pwrrt/exe/rs_remote_alcm
chmod u+s /usr/pwrrt/exe/rs_remote_alcm
chown root /usr/pwrrt/exe/rt_prio
chmod u+s /usr/pwrrt/exe/rt_prio
chown root /usr/pwrrt/exe/rt_mozilla
chmod u+s /usr/pwrrt/exe/rt_mozilla
...
...
src/tools/pkg/suse/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -149,7 +149,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server exe/sev_repair exe/
*
.gif exe/
*
.png exe/sev_xtt_version_help.dat exe/pwr_pkg.sh exe/en_us/
*
.txt doc/
*
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server exe/sev_repair exe/
*
.gif exe/
*
.png exe/sev_xtt_version_help.dat exe/pwr_pkg.sh exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
mkdir
cnf
tar
-xf
$tarfile
...
...
src/tools/pkg/suse/pwrsev/pwrsev.spec
View file @
43c980a2
...
...
@@ -195,8 +195,6 @@ chown -R pwrp /usr/pwrsev
chgrp -R pwrp /usr/pwrsev
chmod u+s /usr/pwrsev/exe/sev_ini
chown root /usr/pwrsev/exe/rt_prio
chmod u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf=0
...
...
src/tools/pkg/ubu/pwrrt/postinst
View file @
43c980a2
...
...
@@ -151,8 +151,6 @@ if grep -q "\bdialout:" /etc/group; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/ubu/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -146,7 +146,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
exe/sev_repair exe/
*
.gif exe/
*
.png load/pwrs.dbs load/pwrb.dbs load/sev_xtt_version_help.dat
\
exe/pwr_pkg.sh exe/rt_xtt exe/rt_xtt_gtk exe/rt_rtt exe/
*
.pwgc exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
...
...
src/tools/pkg/ubu/pwrsev/postinst
View file @
43c980a2
...
...
@@ -169,8 +169,6 @@ chown -R pwrp /usr/pwrsev
chgrp
-R
pwrp /usr/pwrsev
chmod
u+s /usr/pwrsev/exe/sev_ini
chown
root /usr/pwrsev/exe/rt_prio
chmod
u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf
=
0
...
...
src/tools/pkg/ubu_x86_64/pwrrt/postinst
View file @
43c980a2
...
...
@@ -151,8 +151,6 @@ if grep -q "\bdialout:" /etc/group; then
chgrp
dialout /usr/pwrrt/exe/rs_remote_3964r
chmod
ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown
root /usr/pwrrt/exe/rt_prio
chmod
u+s /usr/pwrrt/exe/rt_prio
if
[
-e
/usr/pwrrt/exe/rt_powerlink
]
;
then
chown
root /usr/pwrrt/exe/rt_powerlink
chmod
u+s /usr/pwrrt/exe/rt_powerlink
...
...
src/tools/pkg/ubu_x86_64/pwrsev/build.sh
View file @
43c980a2
...
...
@@ -146,7 +146,7 @@ currentdir="`eval pwd`"
tarfile
=
$pwre_broot
/
$pwre_target
/bld/pkg/pwrtmp.tar
cd
$pwre_broot
/
$pwre_target
/exp
echo
"-- Copy release to package tree"
tar
-cf
$tarfile
exe/rt_qmon exe/
rt_prio exe/
sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
tar
-cf
$tarfile
exe/rt_qmon exe/sev_ini exe/sev_xtt exe/sev_xtt_gtk exe/sev_server
\
exe/sev_repair exe/
*
.gif exe/
*
.png load/pwrs.dbs load/pwrb.dbs load/sev_xtt_version_help.dat
\
exe/pwr_pkg.sh exe/rt_xtt exe/rt_xtt_gtk exe/rt_rtt exe/
*
.pwgc exe/en_us/
*
.txt doc/
*
cd
$pkgroot
/usr/pwrsev
...
...
src/tools/pkg/ubu_x86_64/pwrsev/postinst
View file @
43c980a2
...
...
@@ -169,8 +169,6 @@ chown -R pwrp /usr/pwrsev
chgrp
-R
pwrp /usr/pwrsev
chmod
u+s /usr/pwrsev/exe/sev_ini
chown
root /usr/pwrsev/exe/rt_prio
chmod
u+s /usr/pwrsev/exe/rt_prio
# Copy configuration files
new_cnf
=
0
...
...
src/tools/pwre/src/os_freebsd/pwre_configure.sh
View file @
43c980a2
...
...
@@ -318,7 +318,6 @@ while [ $i -lt $lib_cnt ]; do
i=
$((
i+1
))
done
rm
$pwre_croot
/src/exe/rt_prio/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/otherio/exp/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
rm
$pwre_croot
/remote/exe/rs_remote_alcm/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/profibus/lib/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
...
...
src/tools/pwre/src/os_macos/pwre_configure.sh
View file @
43c980a2
...
...
@@ -317,7 +317,6 @@ while [ $i -lt $lib_cnt ]; do
i=
$((
i+1
))
done
rm
$pwre_croot
/src/exe/rt_prio/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/otherio/exp/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
rm
$pwre_croot
/remote/exe/rs_remote_alcm/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/profibus/lib/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
...
...
src/tools/pwre/src/os_mingw/pwre_configure.sh
View file @
43c980a2
...
...
@@ -321,7 +321,6 @@ while [ $i -lt $lib_cnt ]; do
i=
$((
i+1
))
done
rm
$pwre_croot
/src/exe/rt_prio/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/otherio/exp/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
rm
$pwre_croot
/remote/exe/rs_remote_alcm/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/profibus/lib/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
...
...
src/tools/pwre/src/os_openbsd/pwre_configure.sh
View file @
43c980a2
...
...
@@ -320,7 +320,6 @@ while [ $i -lt $lib_cnt ]; do
i=
$((
i+1
))
done
rm
$pwre_croot
/src/exe/rt_prio/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/otherio/exp/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
rm
$pwre_croot
/remote/exe/rs_remote_alcm/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm
$pwre_croot
/profibus/lib/rt/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
...
...
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