Applied.
--Subrata
On Thu, 2008-02-28 at 09:35 +0100, Sebastien Dugue wrote:
> Add 2 scripts for detecting features used by some tests, namely:
>
> - support for pthread_mutexattr_setprotocol(..., PTHREAD_PRIO_INHERIT)
> - support for pthread_mutexattr_setrobust_np()
>
> Signed-off-by: Sebastien Dugue <[EMAIL PROTECTED]>
> Cc: Darren Hart <[EMAIL PROTECTED]>
> Cc: Tim Chavez <[EMAIL PROTECTED]>
> ---
> testcases/realtime/scripts/check_pi.sh | 23 +++++++++++++++++++++++
> testcases/realtime/scripts/check_robust.sh | 23 +++++++++++++++++++++++
> 2 files changed, 46 insertions(+), 0 deletions(-)
> create mode 100644 testcases/realtime/scripts/check_pi.sh
> create mode 100644 testcases/realtime/scripts/check_robust.sh
>
> diff --git a/testcases/realtime/scripts/check_pi.sh
> b/testcases/realtime/scripts/check_pi.sh
> new file mode 100644
> index 0000000..8e3a105
> --- /dev/null
> +++ b/testcases/realtime/scripts/check_pi.sh
> @@ -0,0 +1,23 @@
> +#! /bin/sh
> +
> +cat > check_pi.c <<EOF
> +#define _GNU_SOURCE
> +#include <pthread.h>
> +
> +int main ()
> +{
> + pthread_mutexattr_t attr;
> + return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
> +}
> +EOF
> +
> +gcc -o check_pi check_pi.c -lpthread 2> check_pi.err
> +status=$?
> +
> +if [ $status -eq 0 ] && [ ! -s check_pi.err ] && [ -x check_pi ]; then
> + echo yes
> +else
> + echo no
> +fi
> +
> +rm -f check_pi.c check_pi check_pi.err
> diff --git a/testcases/realtime/scripts/check_robust.sh
> b/testcases/realtime/scripts/check_robust.sh
> new file mode 100644
> index 0000000..2a808d1
> --- /dev/null
> +++ b/testcases/realtime/scripts/check_robust.sh
> @@ -0,0 +1,23 @@
> +#! /bin/sh
> +
> +cat > check_robust.c <<EOF
> +#define _GNU_SOURCE
> +#include <pthread.h>
> +
> +int main ()
> +{
> + pthread_mutexattr_t attr;
> + return pthread_mutexattr_setrobust_np(&attr, 0);
> +}
> +EOF
> +
> +gcc -o check_robust check_robust.c -lpthread 2> check_robust.err
> +status=$?
> +
> +if [ $status -eq 0 ] && [ ! -s check_robust.err ] && [ -x check_robust ];
> then
> + echo yes
> +else
> + echo no
> +fi
> +
> +rm -f check_robust.c check_robust check_robust.err
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list