1
1
Jeff Squyres c7c3de87f5 Add ummunotify support to Open MPI. See
http://marc.info/?l=linux-mm-commits&m=127352503417787&w=2 for more
details.

 * Remove the ptmalloc memory component; replace it with a new "linux"
   memory component.
 * The linux memory component will conditionally compile in support
   for ummunotify.  At run-time, if it has ummunotify support and
   finds run-time support for ummunotify (i.e., /dev/ummunotify), it
   uses it.  If not, it tries to use ptmalloc via the glibc memory
   hooks. 
 * Add some more API functions to the memory framework to accomodate
   the ummunotify model (i.e., poll to see if memory has "changed").
 * Add appropriate calls in the rcache to the new memory APIs to see
   if memory has changed, and to react accordingly.
 * Add a few comments in the openib BTL to indicate why we don't need
   to notify the OPAL memory framework about specific instances of
   registered memory.
 * Add dummy API calls in the solaris malloc component (since it
   doesn't have polling/"did memory change" support).

This commit was SVN r23113.
2010-05-11 21:43:19 +00:00

49 строки
736 B
C

/*
* $Id:$
* Generic version: no threads.
* by Wolfram Gloger 2004
*/
#include <stdio.h>
struct thread_st {
char *sp; /* stack pointer, can be 0 */
void (*func)(struct thread_st* st); /* must be set by user */
int id;
int flags;
struct user_data u;
};
static void
thread_init(void)
{
printf("No threads.\n");
}
/* Create a thread. */
static int
thread_create(struct thread_st *st)
{
st->flags = 0;
st->id = 1;
st->func(st);
return 0;
}
/* Wait for one of several subthreads to finish. */
static void
wait_for_thread(struct thread_st st[], int n_thr,
int (*end_thr)(struct thread_st*))
{
int i;
for(i=0; i<n_thr; i++)
if(end_thr)
end_thr(&st[i]);
}
/*
* Local variables:
* tab-width: 4
* End:
*/