aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/include/uisthread.h
blob: 52c3eb4ded2c5c3deb465b32bb012026d922ae36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* uisthread.h
 *
 * Copyright (C) 2010 - 2013 UNISYS CORPORATION
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 * NON INFRINGEMENT.  See the GNU General Public License for more
 * details.
 */

/*****************************************************************************/
/* Unisys thread utilities header                                            */
/*****************************************************************************/

#ifndef __UISTHREAD_H__
#define __UISTHREAD_H__

#include "linux/completion.h"

struct uisthread_info {
	struct task_struct *task;
	int id;
	struct completion has_stopped;
};

/* returns 0 for failure, 1 for success */
int uisthread_start(
	struct uisthread_info *thrinfo,
	int (*threadfn)(void *),
	void *thrcontext,
	char *name);

void uisthread_stop(struct uisthread_info *thrinfo);

#endif /* __UISTHREAD_H__ */