Date: Wed, 29 Mar 2006 15:54:38 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94247 for review Message-ID: <200603291554.k2TFscqD048059@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94247 Change 94247 by marcel@marcel_nfs on 2006/03/29 15:54:37 Rename uart_[un]lock_spin() to uart_[un]lock(). There's no need to advertise the fact that the mutex is a spin mutex in our little wrapper. Affected files ... .. //depot/projects/uart/dev/uart/uart_cpu.h#17 edit Differences ... ==== //depot/projects/uart/dev/uart/uart_cpu.h#17 (text+ko) ==== @@ -87,14 +87,14 @@ */ static __inline void -uart_lock_spin(struct mtx *hwmtx) +uart_lock(struct mtx *hwmtx) { if (!kdb_active && hwmtx != NULL) mtx_lock_spin(hwmtx); } static __inline void -uart_unlock_spin(struct mtx *hwmtx) +uart_unlock(struct mtx *hwmtx) { if (!kdb_active && hwmtx != NULL) mtx_unlock_spin(hwmtx); @@ -105,35 +105,35 @@ { int res; - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); res = di->ops.probe(&di->bas); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); return (res); } static __inline void uart_init(struct uart_devinfo *di) { - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); di->ops.init(&di->bas, di->baudrate, di->databits, di->stopbits, di->parity); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); } static __inline void uart_term(struct uart_devinfo *di) { - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); di->ops.term(&di->bas); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); } static __inline void uart_putc(struct uart_devinfo *di, int c) { - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); di->ops.putc(&di->bas, c); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); } static __inline int @@ -141,9 +141,9 @@ { int res; - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); res = di->ops.poll(&di->bas); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); return (res); } @@ -152,9 +152,9 @@ { int res; - uart_lock_spin(di->hwmtx); + uart_lock(di->hwmtx); res = di->ops.getc(&di->bas); - uart_unlock_spin(di->hwmtx); + uart_unlock(di->hwmtx); return (res); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603291554.k2TFscqD048059>