X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Ftests%2Flibtest.c;h=46f8cc5d3d522841e6afeee7fd527ce427d51504;hb=012f8610237dfe44034c9d8daea0b90fac75ca9f;hp=185c987665e8ab25ee4bd915680c7167904e5b35;hpb=b2a11ac756f940c30b05aa0a8baf733572df4ce5;p=mono.git diff --git a/mono/tests/libtest.c b/mono/tests/libtest.c index 185c987665e..46f8cc5d3d5 100644 --- a/mono/tests/libtest.c +++ b/mono/tests/libtest.c @@ -5500,6 +5500,38 @@ mono_test_marshal_thread_attach (SimpleDelegate del) #endif } +typedef struct { + char arr [4 * 1024]; +} LargeStruct; + +typedef int (STDCALL *LargeStructDelegate) (LargeStruct *s); + +static void +call_managed_large_vt (gpointer arg) +{ + LargeStructDelegate del = (LargeStructDelegate)arg; + LargeStruct s; + + call_managed_res = del (&s); +} + +LIBTEST_API int STDCALL +mono_test_marshal_thread_attach_large_vt (SimpleDelegate del) +{ +#ifdef WIN32 + return 43; +#else + int res; + pthread_t t; + + res = pthread_create (&t, NULL, (gpointer (*)(gpointer))call_managed_large_vt, del); + g_assert (res == 0); + pthread_join (t, NULL); + + return call_managed_res; +#endif +} + typedef int (STDCALL *Callback) (void); static Callback callback;