From: ebotcazou Date: Sun, 6 Dec 2015 14:00:16 +0000 (+0000) Subject: PR ada/49940 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=156d05a51cdbf5bb9b5833fc6d9bd369be6d1453;p=thirdparty%2Fgcc.git PR ada/49940 * s-osinte-kfreebsd-gnu.ads (lwp_self): New imported function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231330 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 848578132022..237022205cb4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-12-06 Ludovic Brenta + + PR ada/49940 + * s-osinte-kfreebsd-gnu.ads (lwp_self): New imported function. + 2015-12-01 Jan Sommer PR ada/68169 diff --git a/gcc/ada/s-osinte-kfreebsd-gnu.ads b/gcc/ada/s-osinte-kfreebsd-gnu.ads index be46c2e531e7..e4c7bd003652 100644 --- a/gcc/ada/s-osinte-kfreebsd-gnu.ads +++ b/gcc/ada/s-osinte-kfreebsd-gnu.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -236,6 +236,16 @@ package System.OS_Interface is function getpid return pid_t; pragma Import (C, getpid, "getpid"); + --------- + -- LWP -- + --------- + + function lwp_self return System.Address; + -- lwp_self does not exist on this thread library, revert to pthread_self + -- which is the closest approximation (with getpid). This function is + -- needed to share 7staprop.adb across POSIX-like targets. + pragma Import (C, lwp_self, "pthread_self"); + ------------- -- Threads -- -------------