Minimal impl of pthread_attr_setstacksize.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@279 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index e0f4806..7457dd2 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -156,15 +156,6 @@
static void not_inside ( char* msg )
{
VG_(startup)();
- return;
- if (get_pt_trace_level() >= 0) {
- char* ig = "valgrind's libpthread.so: NOT INSIDE VALGRIND "
- "during call to: ";
- write(2, ig, strlen(ig));
- write(2, msg, strlen(msg));
- ig = "\n";
- write(2, ig, strlen(ig));
- }
}
void vgPlain_unimp ( char* what )
@@ -216,6 +207,19 @@
return 0;
}
+__attribute__((weak))
+int pthread_attr_setstacksize (pthread_attr_t *__attr,
+ size_t __stacksize)
+{
+ ensure_valgrind("pthread_attr_setstacksize");
+ if (__stacksize < VG_PTHREAD_STACK_SIZE)
+ return 0;
+ barf("pthread_attr_setstacksize: "
+ "requested size >= VG_PTHREAD_STACK_SIZE\n "
+ "edit vg_include.h and rebuild.");
+}
+
+
/* This is completely bogus. */
int pthread_attr_getschedparam(const pthread_attr_t *attr,
struct sched_param *param)