oh, but you missed a spot in lock.
- erik
> we do that in ilock() and canlock() so it's a bug I think to not do it also
> in lock().
> The field is only used in iprintcanlock which use canlock(), not lock(), so
> this
> if fine, but for consistency it would be better to also do it in lock() no?
ilock and unlock could assert(l->m->machno
Hi,
Here is a patch for tasklock.c:
int
lock(Lock *l)
{
int i;
ulong pc;
pc = getcallerpc(&l);
lockstats.locks++;
if(up)
inccnt(&up->nlocks);/* prevent being scheded */
if(tas(&l->key) == 0){
if(up)