⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linuxrealtime.pm

📁 Linux Distributed Replication Block Device
💻 PM
字号:
package LinuxRealTime;# Thanks to SWIG for creating parts of this filerequire Exporter;require DynaLoader;our @ISA = qw(Exporter DynaLoader);our @EXPORT = qw();package LinuxRealTimec;bootstrap LinuxRealTime;package LinuxRealTime;our $VERSION = '0.01';*setRealTime = *LinuxRealTimec::setRealTime;1;__END__=head1 NAMELinuxRealTime - Perl extension for setting real time priority=head1 SYNOPSIS  use LinuxRealTime;  LinuxRealTime::setRealTime(10);  # freeze the computer for a while  my $j; my $i;  foreach $j (0..30_000_000)  {  $i = sqrt ($j);   }=head1 DESCRIPTIONCalling LinuxRealTime::setRealTime(10) sets the scheduling method of the current taskto SCHED_FIFO with a priority of 10 (if the script is executed by root). The parameterspecifies the priority, so different scripts can run with different priorities.SCHED_FIFO is used to build real time applications. The linux kernel (>= 2.6) schedules all tasks using SCHED_FIFO _before_ any other "interactive task". Therefore all CPU resources are then used by the Perl skript.This can be used to meassure execution times or to build real time applications.!!!!! BE CAREFULL !!!!!Be CAREFULL with scripts that have long execution times. Once started as root,you will not even be able to send a CTRL-C to your script as the shell or X won't get any CPU ressources.=head2 EXPORTNone by default.=head1 SEE ALSO=head1 AUTHORDaniel Zinn, E<lt>perl-public@qmic.de<gt>=head1 COPYRIGHT AND LICENSECopyright (C) 2005 by Daniel ZinnThis library is free software; you can redistribute it and/or modifyit under the same terms as Perl itself. =cut

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -