Zach Brown wrote:
Again __set_bit()/__clear_bit() take unsigned long while chunk->size is
unsigned short. Can it cause problem if I cast this chunk->size to
unsigned long and pass to them?

_Yes_.  That's what I said in the first mail and why I brought it up to
begin with!  Maybe architectures (like i386!) implement it with assembly
that will write to the entire long when setting a given bit.

- z

Ok, then I will do with this (as posted earlier):

#define ChunkFree(chunk)        \
       (!!(chunk->size & (1 << CHUNK_FREE)))
#define SetChunkFree(chunk)        \
       (chunk->size |= (1 << CHUNK_FREE))
#define ClearChunkFree(chunk)        \
       (chunk->size &= ~(1 << CHUNK_FREE))


-- Nitin

_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel

Reply via email to