Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
73ab8cc2
Commit
73ab8cc2
authored
10 years ago
by
stijn
Browse files
Options
Downloads
Patches
Plain Diff
Add fsync for windows, i.e. _commit. See
dce8876d
parent
dce8876d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unix/file.c
+5
-4
5 additions, 4 deletions
unix/file.c
with
5 additions
and
4 deletions
unix/file.c
+
5
−
4
View file @
73ab8cc2
...
...
@@ -39,6 +39,10 @@
#include
"runtime.h"
#include
"stream.h"
#ifdef _WIN32
#define fsync _commit
#endif
typedef
struct
_mp_obj_fdfile_t
{
mp_obj_base_t
base
;
int
fd
;
...
...
@@ -83,12 +87,9 @@ STATIC mp_int_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, int
}
STATIC
mp_obj_t
fdfile_flush
(
mp_obj_t
self_in
)
{
#ifndef _WIN32
mp_obj_fdfile_t
*
self
=
self_in
;
check_fd_is_open
(
self
);
fsync
(
self
->
fd
);
#else
//TODO
#endif
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
fdfile_flush_obj
,
fdfile_flush
);
...
...
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