Commit e8f5a97a authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@406 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent eb414d73
No preview for this file type
......@@ -405,6 +405,10 @@ public:
typedef pthread_t thrid_t;
/*! \brief Get current thread id
*/
static thrid_t GetThreadId();
/*! \brief Increase/Decrease priority of a thread
*/
static bool ChangePriority(int dp,thrid_t thr = GetThreadId());
......@@ -417,10 +421,6 @@ public:
*/
static bool SetPriority(int p,thrid_t thr = GetThreadId());
/*! \brief Get current thread id
*/
static thrid_t GetThreadId();
#endif // FLEXT_THREADS
......@@ -437,7 +437,8 @@ protected:
/*! \brief Thread parameters
\internal
*/
class thr_params
class thr_params:
public flext
{
public:
thr_params(flext_base *c,int n = 1);
......
/*
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
// This is the prefix file for CodeWarrior projects - threaded version
#ifndef _FLEXT_CW_MAX_X_THR_H
#define _FLEXT_CW_MAX_X_THR_H
#define FLEXT_THREADS
#define _POSIX_THREADS
/*
old CodeWarrior version (<= 6) don't have sigset_t defined which
is needed for pthreads
*/
#if defined(__MWERKS__) && (__MWERKS__ <= 0x6000)
typedef unsigned int sigset_t;
#define _CW_NOPRECOMP // no precompiled headers
#endif
#include "flcwmax-x.h"
#endif
......@@ -8,12 +8,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
// This is the prefix file for CodeWarrior projects - threaded version
// This is the prefix file for CodeWarrior projects - OS X version
#ifndef _FLEXT_CW_MAX_THR_H
#define _FLEXT_CW_MAX_THR_H
#ifndef _FLEXT_CW_MAX_X_H
#define _FLEXT_CW_MAX_X_H
#define FLEXT_THREADS
#define TARGET_API_MAC_CARBON 1
#define _POSIX_C_SOURCE
#include "flcwmax.h"
......
......@@ -13,14 +13,36 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef _FLEXT_CW_MAX_H
#define _FLEXT_CW_MAX_H
#include <MacHeaders.h>
#define MAXMSP
#ifndef __MWERKS__
#error "This header file is for CodeWarrior only."
#endif
#if !defined(__OPTIMIZE__) || __OPTIMIZE__ == 0
#define _DEBUG
#ifndef _CW_NOPRECOMP
#include <MacHeaders.h>
#endif
#if __option(sym) || !__option(opt_dead_code)
#define _DEBUG
#endif
#ifdef MAXMSP
#pragma message("#define MAXMSP is deprecated, use #define FLEXT_SYS_MAX instead")
#else
#define FLEXT_SYS_MAX
// this is deprecated (but still necessary)
#define MAXMSP
#endif
#if __POWERPC__
#define FLEXT_PLATFORM_MAC
#elif __INTEL__
#define FLEXT_PLATFORM_WIN
// this is necessary for Cycling headers when compiling for Windows
#define WIN_VERSION 1
#else
#error "Target platform not supported."
#endif
/* #define _LOG */
#endif
......@@ -149,7 +149,7 @@ flext_base::~flext_base()
shouldexit = true;
for(int wi = 0; thrhead && wi < 100; ++wi) Sleep(0.01f);
#ifdef PD
#ifdef _POSIX_THREADS
qmutex.Lock(); // Lock message queue
tlmutex.Lock();
// timeout -> hard termination
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment