linux/drivers/staging/unisys/include/uisthread.h
<<
>>
Prefs
   1/* uisthread.h
   2 *
   3 * Copyright (C) 2010 - 2013 UNISYS CORPORATION
   4 * All rights reserved.
   5 *
   6 * This program is free software; you can redistribute it and/or modify
   7 * it under the terms of the GNU General Public License as published by
   8 * the Free Software Foundation; either version 2 of the License, or (at
   9 * your option) any later version.
  10 *
  11 * This program is distributed in the hope that it will be useful, but
  12 * WITHOUT ANY WARRANTY; without even the implied warranty of
  13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  14 * NON INFRINGEMENT.  See the GNU General Public License for more
  15 * details.
  16 */
  17
  18/*****************************************************************************/
  19/* Unisys thread utilities header                                            */
  20/*****************************************************************************/
  21
  22
  23#ifndef __UISTHREAD_H__
  24#define __UISTHREAD_H__
  25
  26
  27#include "linux/completion.h"
  28
  29struct uisthread_info {
  30        struct task_struct *task;
  31        int id;
  32        int should_stop;
  33        struct completion has_stopped;
  34};
  35
  36
  37/* returns 0 for failure, 1 for success */
  38int uisthread_start(
  39        struct uisthread_info *thrinfo,
  40        int (*threadfn)(void *),
  41        void *thrcontext,
  42        char *name);
  43
  44void uisthread_stop(struct uisthread_info *thrinfo);
  45
  46#endif /* __UISTHREAD_H__ */
  47