Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Bug 15073: convert SIGRTMIN/SIGRTMAX to properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tomer-weka committed Sep 17, 2015
1 parent 4bc07fc commit a6e3f93
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/core/sys/posix/signal.d
Expand Up @@ -110,9 +110,6 @@ version( Solaris )
import core.sys.posix.unistd;
private int _sigrtmin() { return cast(int) sysconf(_SC_SIGRT_MIN); }
private int _sigrtmax() { return cast(int) sysconf(_SC_SIGRT_MAX); }

alias _sigrtmin SIGRTMIN;
alias _sigrtmax SIGRTMAX;
}
else version( Posix )
{
Expand All @@ -122,8 +119,24 @@ else version( Posix )
int __libc_current_sigrtmax();
}

alias __libc_current_sigrtmin SIGRTMIN;
alias __libc_current_sigrtmax SIGRTMAX;
alias __libc_current_sigrtmin _sigrtmin;
alias __libc_current_sigrtmax _sigrtmax;
}

@property int SIGRTMIN() {
static int sig = -1;
if (sig == -1) {
sig = _sigrtmin();
}
return sig;
}

@property int SIGRTMAX() {
static int sig = -1;
if (sig == -1) {
sig = _sigrtmax();
}
return sig;
}

version( linux )
Expand Down

0 comments on commit a6e3f93

Please sign in to comment.