| /* |
| * Copyright (c) 2017 FH Dortmund and others |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Description: |
| * pThread Core Affinity Pinning |
| * |
| * Authors: |
| * M. Ozcelikors, R.Hottger |
| * <mozcelikors@gmail.com> <robert.hoettger@fh-dortmund.de> |
| * |
| * Contributors: |
| * |
| * Update History: |
| * 02.02.2017 - first compilation |
| * 15.03.2017 - updated tasks for web-based driving |
| * |
| */ |
| |
| #ifndef PTHREAD_DISTRIBUTION_H_ |
| #define PTHREAD_DISTRIBUTION_H_ |
| |
| //Includes needed |
| #include <pthread.h> |
| #include <iostream> |
| #include <stdlib.h> |
| #include <unistd.h> |
| #include <sched.h> |
| #include <cstdio> |
| #include <errno.h> |
| #include <pthread.h> |
| |
| int placeThisThreadToCore(int core_id); |
| int placeAThreadToCore (pthread_t thread, int core_id); |
| |
| |
| #endif /* PTHREAD_DISTRIBUTION_H_ */ |