line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POSIX::RT::Signal; |
2
|
|
|
|
|
|
|
$POSIX::RT::Signal::VERSION = '0.015'; |
3
|
1
|
|
|
1
|
|
23433
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use Carp qw/croak/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
79
|
|
7
|
1
|
|
|
1
|
|
903
|
use POSIX qw//; |
|
1
|
|
|
|
|
7178
|
|
|
1
|
|
|
|
|
28
|
|
8
|
1
|
|
|
1
|
|
10
|
use XSLoader; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
9
|
1
|
|
|
1
|
|
920
|
use Sub::Exporter::Progressive -setup => { exports => [qw/sigwaitinfo sigwait sigqueue allocate_signal deallocate_signal/] }; |
|
1
|
|
|
|
|
1382
|
|
|
1
|
|
|
|
|
13
|
|
10
|
1
|
|
|
1
|
|
1335
|
use threads::shared; |
|
1
|
|
|
|
|
1379
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
925
|
my @signals : shared = (defined &POSIX::SIGRTMIN) ? (POSIX::SIGRTMIN() .. POSIX::SIGRTMAX()) : (POSIX::SIGUSR1(), POSIX::SIGUSR2()); |
|
1
|
|
|
|
|
1351
|
|
|
1
|
|
|
|
|
181
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my %allowed = map { ( $_ => 1 ) } @signals; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub allocate_signal { |
19
|
3
|
|
|
3
|
1
|
207056
|
my ($priority) = @_; |
20
|
3
|
|
33
|
|
|
17
|
return +($priority ? shift @signals : pop @signals) || croak 'no more signal numbers available'; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub deallocate_signal { |
24
|
1
|
|
|
1
|
1
|
457
|
my ($signal) = @_; |
25
|
1
|
50
|
|
|
|
6
|
croak 'Signal not from original set' if not $allowed{$signal}; |
26
|
1
|
|
|
|
|
10
|
@signals = sort { $a <=> $b } @signals, $signal; |
|
29
|
|
|
|
|
29
|
|
27
|
1
|
|
|
|
|
5
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#ABSTRACT: POSIX Real-time signal handling functions |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |