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
4c7b9885
Commit
4c7b9885
authored
10 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Update some comments
parent
a0f3267d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fs/aio/aio_read.c
+6
-26
6 additions, 26 deletions
fs/aio/aio_read.c
fs/aio/aio_write.c
+6
-26
6 additions, 26 deletions
fs/aio/aio_write.c
include/aio.h
+1
-1
1 addition, 1 deletion
include/aio.h
with
13 additions
and
53 deletions
fs/aio/aio_read.c
+
6
−
26
View file @
4c7b9885
...
...
@@ -158,6 +158,12 @@ static void aio_read_worker(FAR void *arg)
* has been initiated or queued to the file or device (even when the data
* cannot be delivered immediately).
*
* If prioritized I/O is supported for this file, then the asynchronous
* operation will be submitted at a priority equal to a base scheduling
* priority minus aiocbp->aio_reqprio. If Thread Execution Scheduling is
* not supported, then the base scheduling priority is that of the calling
* thread (the latter is implemented at present).
*
* The aiocbp value may be used as an argument to aio_error() and
* aio_return() in order to determine the error status and return status,
* respectively, of the asynchronous operation while it is proceeding. If
...
...
@@ -233,32 +239,6 @@ static void aio_read_worker(FAR void *arg)
* description associated with aiocbp->aio_fildes.
*
* POSIX Compliance:
* - The POSIX specification of asynchronous I/O implies that a thread is
* created for each I/O operation. The standard requires that if
* prioritized I/O is supported for this file, then the asynchronous
* operation will be submitted at a priority equal to a base scheduling
* priority minus aiocbp->aio_reqprio. If Thread Execution Scheduling is
* not supported, then the base scheduling priority is that of the calling
* thread.
*
* My initial gut feeling is the creating a new thread on each asynchronous
* I/O operation would not be a good use of resources in a deeply embedded
* system. So I decided to execute all asynchronous I/O on a low-priority
* or user-space worker thread. There are two negative consequences of this
* decision that need to be revisited:
*
* 1) The worker thread runs at a fixed priority making it impossible to
* meet the POSIX requirement for asynchronous I/O. That standard
* specifically requires varying priority.
* 2) On the worker thread, each I/O will still be performed synchronously,
* one at a time. This is not a violation of the POSIX requirement,
* but one would think there could be opportunities for concurrent I/O.
*
* In reality, in a small embedded system, there will probably only be one
* real file system and, in this case, the I/O will be performed sequentially
* anyway. Most simple embedded hardware will not support any concurrent
* accesses.
*
* - Most errors required in the standard are not detected at this point.
* There are no pre-queuing checks for the validity of the operation.
*
...
...
This diff is collapsed.
Click to expand it.
fs/aio/aio_write.c
+
6
−
26
View file @
4c7b9885
...
...
@@ -203,6 +203,12 @@ static void aio_write_worker(FAR void *arg)
* has been initiated or queued to the file or device (even when the data
* cannot be delivered immediately).
*
* If prioritized I/O is supported for this file, then the asynchronous
* operation will be submitted at a priority equal to a base scheduling
* priority minus aiocbp->aio_reqprio. If Thread Execution Scheduling is
* not supported, then the base scheduling priority is that of the calling
* thread (the latter is implemented at present).
*
* The aiocbp value may be used as an argument to aio_error() and
* aio_return() in order to determine the error status and return status,
* respectively, of the asynchronous operation while it is proceeding.
...
...
@@ -280,32 +286,6 @@ static void aio_write_worker(FAR void *arg)
* with aiocbp->aio_fildes.
*
* POSIX Compliance:
* - The POSIX specification of asynchronous I/O implies that a thread is
* created for each I/O operation. The standard requires that if
* prioritized I/O is supported for this file, then the asynchronous
* operation will be submitted at a priority equal to a base scheduling
* priority minus aiocbp->aio_reqprio. If Thread Execution Scheduling is
* not supported, then the base scheduling priority is that of the calling
* thread.
*
* My initial gut feeling is the creating a new thread on each asynchronous
* I/O operation would not be a good use of resources in a deeply embedded
* system. So I decided to execute all asynchronous I/O on a low-priority
* or user-space worker thread. There are two negative consequences of this
* decision that need to be revisited:
*
* 1) The worker thread runs at a fixed priority making it impossible to
* meet the POSIX requirement for asynchronous I/O. That standard
* specifically requires varying priority.
* 2) On the worker thread, each I/O will still be performed synchronously,
* one at a time. This is not a violation of the POSIX requirement,
* but one would think there could be opportunities for concurrent I/O.
*
* In reality, in a small embedded system, there will probably only be one
* real file system and, in this case, the I/O will be performed sequentially
* anyway. Most simple embedded hardware will not support any concurrent
* accesses.
*
* - Most errors required in the standard are not detected at this point.
* There are no pre-queuing checks for the validity of the operation.
*
...
...
This diff is collapsed.
Click to expand it.
include/aio.h
+
1
−
1
View file @
4c7b9885
...
...
@@ -126,7 +126,7 @@ struct aiocb
off_t
aio_offset
;
/* File offset */
size_t
aio_nbytes
;
/* Length of transfer */
int
aio_fildes
;
/* File descriptor */
int8_t
aio_reqprio
;
/* Request priority offset */
int8_t
aio_reqprio
;
/* Request priority offset
(not used)
*/
uint8_t
aio_lio_opcode
;
/* Operation to be performed */
/* Non-standard, implementation-dependent data. For portability reasons,
...
...
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