离散数学一直没有能学好,这真是心中很难受的事情。今天写了一点简单的程序,居然没有能够一气呵成,比较丢脸。
enum
TEST_STATE
{
TEST_STATE_NORMAL
=0x0,
TEST_STATE_LOCALBLOCK
=0x1,
TEST_STATE_REMOTEBLOCK
=0x2,
TEST_STATE_BOTHBLOCK
=0x3,
};
unsigned
long
test
= 0;
void
BlockLocal
()
{
test
=
test
|0x1;
}
void
UnblockLocal
()
{
test
=~(~
test
|0x1);
}
void
BlockRemote
()
{
test
=
test
|0x2;
}
void
UnblockRemote
()
{
test
=~(~
test
|0x2);
}