Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
bitmsk.h
- Committer:
- greletj
- Date:
- 2012-11-28
- Revision:
- 0:b3a2e39a13ad
- Child:
- 1:a4c87bc5b008
File content as of revision 0:b3a2e39a13ad:
/*
* bitmsk.h
*/
#ifndef bitmsk_H
#define bitmsk_H
#include <string.h>
#define MAX_TACHES 32 // Maxi arbitraire
#define BITMSK_SIZE MAX_TACHES / 8
#define BITMSK_RIEN 0
typedef unsigned char BITMSK;
typedef enum { ADD,
REM,
SETF,
SETB,
SETA,
IS
} TMODE; // cf Win::seta()
// #define NOPID -1 // DOS
#define NOPIDUNIX -1
typedef int PID; // De NOPID a MAX_TACHES
#define BITMODE TMODE // cf. video.h
class Bitmsk
{
// Membres
private:
BITMSK bits[ BITMSK_SIZE ];
// Methodes
public:
bool requete( BITMODE mode,PID pid );
void raz( void );
// Constructeurs
public:
Bitmsk( PID nb = 0,... );
Bitmsk( Bitmsk &modele );
};
/*****************************************************************************
* Prototypes des fonctions d'interface *
*****************************************************************************/
BITMSK setmsk( BITMSK *bitmsk,BITMODE mode,BITMSK new_msk );
#endif