Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 2015 21:11:34 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286257 - in head/sys: kern sys
Message-ID:  <201508032111.t73LBYlS014436@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Mon Aug  3 21:11:33 2015
New Revision: 286257
URL: https://svnweb.freebsd.org/changeset/base/286257

Log:
  Add missing const keyword to function parameter.
  
  The umtx_key_get() function does not dereference the address off the
  userspace object. The pointer can safely be const.

Modified:
  head/sys/kern/kern_umtx.c
  head/sys/sys/umtx.h

Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c	Mon Aug  3 20:43:36 2015	(r286256)
+++ head/sys/kern/kern_umtx.c	Mon Aug  3 21:11:33 2015	(r286257)
@@ -793,7 +793,7 @@ umtxq_sleep(struct umtx_q *uq, const cha
  * Convert userspace address into unique logical address.
  */
 int
-umtx_key_get(void *addr, int type, int share, struct umtx_key *key)
+umtx_key_get(const void *addr, int type, int share, struct umtx_key *key)
 {
 	struct thread *td = curthread;
 	vm_map_t map;

Modified: head/sys/sys/umtx.h
==============================================================================
--- head/sys/sys/umtx.h	Mon Aug  3 20:43:36 2015	(r286256)
+++ head/sys/sys/umtx.h	Mon Aug  3 21:11:33 2015	(r286257)
@@ -153,7 +153,7 @@ umtx_key_match(const struct umtx_key *k1
 }
 
 int umtx_copyin_timeout(const void *, struct timespec *);
-int umtx_key_get(void *, int, int, struct umtx_key *);
+int umtx_key_get(const void *, int, int, struct umtx_key *);
 void umtx_key_release(struct umtx_key *);
 struct umtx_q *umtxq_alloc(void);
 void umtxq_free(struct umtx_q *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508032111.t73LBYlS014436>