Blame source/vdo/kernel/threads.h
|
Packit Service |
cbade1 |
/*
|
|
Packit Service |
cbade1 |
* Copyright (c) 2020 Red Hat, Inc.
|
|
Packit Service |
cbade1 |
*
|
|
Packit Service |
cbade1 |
* This program is free software; you can redistribute it and/or
|
|
Packit Service |
cbade1 |
* modify it under the terms of the GNU General Public License
|
|
Packit Service |
cbade1 |
* as published by the Free Software Foundation; either version 2
|
|
Packit Service |
cbade1 |
* of the License, or (at your option) any later version.
|
|
Packit Service |
cbade1 |
*
|
|
Packit Service |
cbade1 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
cbade1 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
cbade1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
cbade1 |
* GNU General Public License for more details.
|
|
Packit Service |
cbade1 |
*
|
|
Packit Service |
cbade1 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
cbade1 |
* along with this program; if not, write to the Free Software
|
|
Packit Service |
cbade1 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
cbade1 |
* 02110-1301, USA.
|
|
Packit Service |
cbade1 |
*
|
|
Packit Service |
cbade1 |
* $Id: //eng/vdo-releases/aluminum/src/c++/vdo/kernel/threads.h#1 $
|
|
Packit Service |
cbade1 |
*/
|
|
Packit Service |
cbade1 |
|
|
Packit Service |
cbade1 |
#ifndef THREADS_H
|
|
Packit Service |
cbade1 |
#define THREADS_H
|
|
Packit Service |
cbade1 |
|
|
Packit Service |
cbade1 |
#include <linux/types.h>
|
|
Packit Service |
cbade1 |
|
|
Packit Service |
cbade1 |
/**
|
|
Packit Service |
cbade1 |
* Return the id of the current thread.
|
|
Packit Service |
cbade1 |
* In kernel interrupt context, returns -1.
|
|
Packit Service |
cbade1 |
*
|
|
Packit Service |
cbade1 |
* @return the thread id
|
|
Packit Service |
cbade1 |
**/
|
|
Packit Service |
cbade1 |
pid_t getThreadId(void)
|
|
Packit Service |
cbade1 |
__attribute__((warn_unused_result));
|
|
Packit Service |
cbade1 |
|
|
Packit Service |
cbade1 |
#endif /* THREADS_H */
|