• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  *   Copyright (c) International Business Machines  Corp., 2001
4  *
5  *   This program is free software;  you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation; either version 2 of the License, or
8  *   (at your option) any later version.
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
13  *   the GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program;  if not, write to the Free Software
17  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 struct child_info {
21 	int	index;			/* our index into the array */
22 	int	status;			/* return status of this thread */
23 	int	child_count;		/* Count of children created */
24 	int	talk_count;		/* Count of siblings that */
25 					/* have talked to us */
26 	pthread_t	*threads;	/* dynamic array of thread */
27 					/* ids of children */
28 	pthread_mutex_t	talk_mutex;	/* mutex for the talk_count */
29 	pthread_mutex_t	child_mutex;	/* mutex for the child_count */
30 	pthread_cond_t	talk_condvar;	/* condition variable for talk_count */
31 	pthread_cond_t	child_condvar;	/* condition variable for child_count */
32 	struct child_info	**child_ptrs; 	/* dynamic array of ptrs */
33 						/* to children */
34 } ;
35 
36 typedef struct child_info c_info;
37