ref: 73137841b26b784846ed1925d8c2f006b60e5205
parent: 67ce0bdcd2da7045d3d758561b2d4ac55ee35b69
author: rodri <rgl@antares-labs.eu>
date: Thu Aug 7 06:37:38 EDT 2025
kernel: rename RWlock to RWLock for consistency with userspace
--- a/sys/src/9/ip/arp.c
+++ b/sys/src/9/ip/arp.c
@@ -35,7 +35,7 @@
*/
struct Arp
{
- RWlock;
+ RWLock;
Fs *f;
Arpent *hash[NHASH];
Arpent cache[NCACHE];
--- a/sys/src/9/ip/ip.h
+++ b/sys/src/9/ip/ip.h
@@ -375,7 +375,7 @@
struct Ipifc
{
- RWlock;
+ RWLock;
Conv *conv; /* link to its conversation structure */
char dev[64]; /* device we're attached to */
@@ -473,7 +473,7 @@
*/
struct Fs
{
- RWlock;
+ RWLock;
int dev;
int np;
--- a/sys/src/9/ip/iproute.c
+++ b/sys/src/9/ip/iproute.c
@@ -14,7 +14,7 @@
/* these are used for all instances of IP */
static Route* v4freelist;
static Route* v6freelist;
-static RWlock routelock;
+static RWLock routelock;
static ulong v4routegeneration, v6routegeneration;
static void
--- a/sys/src/9/port/chan.c
+++ b/sys/src/9/port/chan.c
@@ -629,9 +629,9 @@
* - the mhead in chans returned from createdir:
* used in the open/create race protect, which is gone.
*
- * The RWlock in the Mhead protects the mount list it contains.
+ * The RWLock in the Mhead protects the mount list it contains.
* The mount list is deleted in cunmount() and closepgrp().
- * The RWlock ensures that nothing is using the mount list at that time.
+ * The RWLock ensures that nothing is using the mount list at that time.
*
* It is okay to replace c->mh with whatever you want as
* long as you are sure you have a unique reference to it.
--- a/sys/src/9/port/devaoe.c
+++ b/sys/src/9/port/devaoe.c
@@ -227,7 +227,7 @@
} events;
static struct {
- RWlock;
+ RWLock;
int nd;
Aoedev *d;
} devs;
--- a/sys/src/9/port/devbridge.c
+++ b/sys/src/9/port/devbridge.c
@@ -101,7 +101,7 @@
struct Bridge
{
- RWlock;
+ RWLock;
ulong dev; /* bridgetab[dev] */
--- a/sys/src/9/port/devfs.c
+++ b/sys/src/9/port/devfs.c
@@ -109,7 +109,7 @@
extern Dev fsdevtab; /* forward */
-static RWlock lck; /* r: use devices; w: change config */
+static RWLock lck; /* r: use devices; w: change config */
static Tree fstree; /* The main "fs" tree. Never goes away */
static Tree *trees[Ntrees]; /* internal representation of config */
static int ntrees; /* max number of trees */
--- a/sys/src/9/port/devsrv.c
+++ b/sys/src/9/port/devsrv.c
@@ -52,7 +52,7 @@
static char clone[] = "clone";
-static RWlock srvlk;
+static RWLock srvlk;
static ulong srvpath;
static Board srvroot;
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -39,7 +39,7 @@
typedef struct Rendez Rendez;
typedef struct Rendezq Rendezq;
typedef struct Rgrp Rgrp;
-typedef struct RWlock RWlock;
+typedef struct RWLock RWLock;
typedef struct Sargs Sargs;
typedef struct Schedq Schedq;
typedef struct Segment Segment;
@@ -89,7 +89,7 @@
Rendez;
};
-struct RWlock
+struct RWLock
{
Lock use;
Proc *head; /* list of waiting processes */
@@ -269,7 +269,7 @@
struct Mhead
{
Ref;
- RWlock lock;
+ RWLock lock;
Chan* from; /* channel mounted upon */
Mount* mount; /* what's mounted upon it */
Mhead* hash; /* Hash chain */
@@ -509,7 +509,7 @@
struct Pgrp
{
Ref;
- RWlock ns; /* Namespace n read/one write lock */
+ RWLock ns; /* Namespace n read/one write lock */
u64int notallowed[4]; /* Room for 256 devices */
Mhead *mnthash[MNTHASH];
};
@@ -534,7 +534,7 @@
struct Egrp
{
Ref;
- RWlock;
+ RWLock;
Evalue **ent;
int nent; /* numer of slots in ent[] */
int low; /* lowest free index in ent[] */
--- a/sys/src/9/port/portfns.h
+++ b/sys/src/9/port/portfns.h
@@ -21,7 +21,7 @@
int canlock(Lock*);
int canpage(Proc*);
int canqlock(QLock*);
-int canrlock(RWlock*);
+int canrlock(RWLock*);
void chandevinit(void);
void chandevreset(void);
void chandevshutdown(void);
@@ -330,9 +330,9 @@
void resched(char*);
void resrcwait(char*);
int return0(void*);
-void rlock(RWlock*);
+void rlock(RWLock*);
long rtctime(void);
-void runlock(RWlock*);
+void runlock(RWLock*);
Proc* runproc(void);
void sched(void);
_Noreturn void schedinit(void);
@@ -405,8 +405,8 @@
void* vmemchr(void*, int, ulong);
Proc* wakeup(Rendez*);
int walk(Chan**, char**, int, int, int*);
-void wlock(RWlock*);
-void wunlock(RWlock*);
+void wlock(RWLock*);
+void wunlock(RWLock*);
void* xalloc(ulong);
void* xallocz(ulong, int);
void xfree(void*);
--- a/sys/src/9/port/qlock.c
+++ b/sys/src/9/port/qlock.c
@@ -132,7 +132,7 @@
}
void
-rlock(RWlock *q)
+rlock(RWLock *q)
{
Proc *p;
@@ -163,7 +163,7 @@
}
void
-runlock(RWlock *q)
+runlock(RWLock *q)
{
Proc *p;
@@ -187,7 +187,7 @@
}
void
-wlock(RWlock *q)
+wlock(RWLock *q)
{
Proc *p;
uintptr pc;
@@ -225,7 +225,7 @@
}
void
-wunlock(RWlock *q)
+wunlock(RWLock *q)
{
Proc *p;
@@ -265,7 +265,7 @@
/* same as rlock but punts if there are any writers waiting */
int
-canrlock(RWlock *q)
+canrlock(RWLock *q)
{
lock(&q->use);
if(q->writer == 0 && q->head == nil){
--- a/sys/src/9/port/wifi.h
+++ b/sys/src/9/port/wifi.h
@@ -65,7 +65,7 @@
int debug;
- RWlock crypt;
+ RWLock crypt;
Queue *iq;
ulong watchdog;
ulong lastauth;
--- a/sys/src/9/ppc/devflash.c
+++ b/sys/src/9/ppc/devflash.c
@@ -71,7 +71,7 @@
struct Flash
{
ISAConf; /* contains size */
- RWlock;
+ RWLock;
Fword *p;
ushort algid; /* access algorithm */
FlashAlg *alg;
--
⑨