Date: Thu, 7 Sep 2006 13:31:09 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105782 for review Message-ID: <200609071331.k87DV92G011333@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105782 Change 105782 by millert@millert_g5tower on 2006/09/07 13:30:14 Add a keepold argument to labelh_modify() that tells it not to free the old label handle. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.h#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#8 (text+ko) ==== @@ -150,7 +150,7 @@ * Returned label handle is locked. */ ipc_labelh_t -labelh_modify(ipc_labelh_t old) +labelh_modify(ipc_labelh_t old, int keepold) { ipc_labelh_t lh; @@ -163,7 +163,8 @@ return (old); lh = labelh_duplicate(old); lh_release(old); - lh_check_unlock(old); + if (!keepold) + lh_check_unlock(old); lh_lock(lh); return (lh); } ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.h#5 (text+ko) ==== @@ -45,7 +45,7 @@ void labelh_destroy(ipc_port_t port); ipc_labelh_t labelh_duplicate(ipc_labelh_t old); -ipc_labelh_t labelh_modify(ipc_labelh_t old); +ipc_labelh_t labelh_modify(ipc_labelh_t old, int keepold); ipc_labelh_t labelh_new(int canblock); kern_return_t labelh_new_user(ipc_space_t, struct label *, mach_port_name_t *); void labelh_release(ipc_labelh_t lh);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609071331.k87DV92G011333>