Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
e340d899
Commit
e340d899
authored
10 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
First round of fixes for re-implemented VFS message queues
parent
419b074b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
fs/mqueue/mq_close.c
+2
-2
2 additions, 2 deletions
fs/mqueue/mq_close.c
fs/mqueue/mq_open.c
+1
-0
1 addition, 0 deletions
fs/mqueue/mq_open.c
fs/mqueue/mq_unlink.c
+6
-5
6 additions, 5 deletions
fs/mqueue/mq_unlink.c
fs/mqueue/mqueue.h
+1
-1
1 addition, 1 deletion
fs/mqueue/mqueue.h
with
10 additions
and
8 deletions
fs/mqueue/mq_close.c
+
2
−
2
View file @
e340d899
...
...
@@ -149,7 +149,7 @@ int mq_close(mqd_t mqdes)
/* Decrement the reference count on the inode */
mq_release
(
inode
);
mq_
inode_
release
(
inode
);
}
return
OK
;
...
...
@@ -169,7 +169,7 @@ int mq_close(mqd_t mqdes)
*
****************************************************************************/
void
mq_release
(
FAR
struct
inode
*
inode
)
void
mq_
inode_
release
(
FAR
struct
inode
*
inode
)
{
/* Decrement the reference count on the inode */
...
...
This diff is collapsed.
Click to expand it.
fs/mqueue/mq_open.c
+
1
−
0
View file @
e340d899
...
...
@@ -231,6 +231,7 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
/* Bind the message queue and the inode structure */
INODE_SET_MQUEUE
(
inode
);
inode
->
u
.
i_mqueue
=
msgq
;
msgq
->
inode
=
inode
;
}
...
...
This diff is collapsed.
Click to expand it.
fs/mqueue/mq_unlink.c
+
6
−
5
View file @
e340d899
...
...
@@ -151,14 +151,15 @@ int mq_unlink(FAR const char *mq_name)
UNUSED
(
ret
);
/* Now we do not release the reference count in the normal way (by calling
* inode release. Rather, we call sem_close(). sem_close will decrement
* the reference count on the inode. But it will also free the message queue
* if that reference count decrements to zero. Since we hold one reference,
* that can only occur if the message queue is not in-use.
* inode release. Rather, we call mq_inode_release(). mq_inode_release
* will decrement the reference count on the inode. But it will also free
* the message queue if that reference count decrements to zero. Since we
* hold one reference, that can only occur if the message queue is not
* in-use.
*/
inode_semgive
();
mq_release
(
inode
);
mq_
inode_
release
(
inode
);
return
OK
;
errout_with_semaphore:
...
...
This diff is collapsed.
Click to expand it.
fs/mqueue/mqueue.h
+
1
−
1
View file @
e340d899
...
...
@@ -89,7 +89,7 @@ extern "C"
*
****************************************************************************/
void
mq_release
(
FAR
struct
inode
*
inode
);
void
mq_
inode_
release
(
FAR
struct
inode
*
inode
);
#undef EXTERN
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment