Ensure pthread stack attributes are restored
PATCH 1/1 Ensure pthread stack attributes are restored
From: Sukadev Bhattiprolu <[email protected]>
Date: Wed, 9 Dec 2009 18:31:47 +0530
Subject: [PATCH] Ensure pthread stack attributes are restored
--- process-tree/Makefile | 2 +- process-tree/pthread2.c | 244 ++++++++++++++++++++++++++++++++++++++++++ process-tree/run-pthread2.sh | 206 +++++++++++++++++++++++++++++++++++ 3 files changed, 451 insertions(+), 1 deletions(-) create mode 100644 process-tree/pthread2.c create mode 100755 process-tree/run-pthread2.sh
process-tree/Makefile +1 -1
@@ -1,5 +1,5 @@ -targets = ptree1 pthread1 +targets = ptree1 pthread1 pthread2 INCLUDE = ../libcrtest LIBCRTEST = ../libcrtest/common.o
process-tree/pthread2.c new file +244 -0
244 lines not on this page · raw message
process-tree/run-pthread2.sh new file +206 -0
206 lines not on this page · raw message
Signature · 1 line
1.6.0.4
A message that is not in the archive (sent off-list or not yet received): 20091211041126.GC20947-r/[email protected]
Quoted 6 lines · Sukadev Bhattiprolu
From: Sukadev Bhattiprolu <[email protected]>
Date: Wed, 9 Dec 2009 18:31:47 +0530
Subject: [PATCH] Ensure pthread stack attributes are restoredSigned-off-by Sukadev Bhattiprolu <[email protected]>
Thanks - all applied, plus a patch to make pthread2 compile on 64-bit (int vs size_t vs pthread).
-serge
process-tree/run-pthread2.sh line 6
Quoted 8 lines · Sukadev Bhattiprolu
+++
b/process-tree/run-pthread2.shprocess-tree/run-pthread2.sh new file +6
-0@@ -0,0 +1,206 @@ +#!/bin/bash + +source ../common.sh + +#dir=`mktemp -p . -d -t cr_pthread2_XXXXXXX` || (echo "mktemp failed"; exit 1) +dir=cr_pthread2
Note that this means we won't be able to run multiple instances in parallel. Why did you need to do this?
-serge
A message that is not in the archive (sent off-list or not yet received): 20091211153402.GA28867-r/[email protected]
Serge E. Hallyn [serue-r/[email protected]] wrote:
| Quoting Sukadev Bhattiprolu ([email protected]): | > +++ b/process-tree/run-pthread2.sh | > @@ -0,0 +1,206 @@ | > +#!/bin/bash | > + | > +source ../common.sh | > + | > +#dir=`mktemp -p . -d -t cr_pthread2_XXXXXXX` || (echo "mktemp failed"; exit 1) | > +dir=cr_pthread2 | | Note that this means we won't be able to run multiple instances in | parallel. Why did you need to do this? |
Grr, I meant to remove that after my testing.
Anyway, I am wondering if I should just extend the test case to memcmp() the pthread_attr_t before and after C/R rather than individually testing each attribute (like the stack addr/size in this case). I am working on an update to this test and will fix this too.
Sukadev