Fix compilation of arm's AVILA.

Compilation of the AVILA kernel failed because of two reasons:

- It needed curthread, which is defined through <sys/pcpu.h>.

- It still referred the softc's sc_mtx field, which has been replaced by
  sc_lock three weeks ago.

To solve the first problem, I decided to include <sys/pcpu.h> in
<sys/sx.h>, which also seems to be done by <sys/mutex.h> and
<sys/rwlock.h>. Those header files also require curthread.

Approved by:	jhb
This commit is contained in:
Ed Schouten 2008-08-13 09:20:52 +00:00
parent bddff93469
commit 94b9bedcb9
2 changed files with 3 additions and 2 deletions

View File

@ -120,7 +120,7 @@ ad7418_attach(device_t dev)
int conf;
sc->sc_dev = dev;
sx_init(&sc->sc_mtx, "ad7418");
sx_init(&sc->sc_lock, "ad7418");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"temp", CTLTYPE_INT | CTLFLAG_RD, sc, 0,

View File

@ -34,9 +34,10 @@
#include <sys/_lock.h>
#include <sys/_sx.h>
#include <sys/lock_profile.h>
#ifdef _KERNEL
#include <sys/pcpu.h>
#include <sys/lock_profile.h>
#include <machine/atomic.h>
#endif