Thomas Martitz
60e4f20c38
Dircache: Remove dircache_entry::name_len.
...
It's reduntant, and enlarges the dircache unnecessarily. Saves 4 byte per file in the whole filesystem.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30032 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:07:35 +00:00
Andree Buschmann
67f215032d
Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29841 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 21:06:38 +00:00
Michael Sevakis
b15aa47c56
All kernel objects in code shared amongs targets (core, plugins, codecs) should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
2011-02-14 11:27:45 +00:00
Andree Buschmann
5d849a963e
Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Thomas Martitz
2c2416094f
Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Thomas Martitz
6eaab4d004
Ged rid of uisimulator/common/io.c for android builds.
...
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().
Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:29:34 +00:00
Thomas Martitz
5d8ab7b364
Fix reds.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27657 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:22:48 +00:00
Thomas Martitz
9c0b2479f7
Rockbox as an application: add get_user_file_path().
...
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.
On the DAPs it's a no-op, returing /.rockbox directly.
Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Thomas Martitz
74085d2103
Factor out opening and removing DIRCACHE_FILE into separate functions.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27575 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 13:41:47 +00:00
Thomas Martitz
35e8b1429a
Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
...
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.
Should be no functional change to targets or the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Amaury Pouly
b8ad90aba8
dircache:
...
- fix check_event_queue to use queue_peek and not mess message order
- change check_dircache_state to a more modest check to avoid messing up dircache state
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26228 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 12:50:50 +00:00
Michael Chicoine
5e98b27178
Fix typos in comment
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26224 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 10:35:35 +00:00
Amaury Pouly
7c205aa686
FS#10913: fix file browser not updated on microsd insertion/removal. This is a synchro bug in dircache: the system send a SYS_FS_CHANGED message which is first handled by the main thread which rescan the directory but as dircache main treats the message after, the file browser get the old version... Workaround is to check message queue before opening a directory.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26222 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 08:31:11 +00:00
Thomas Martitz
50a6ca39ad
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
...
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Thomas Martitz
0a1d7c28b7
Make open() posix compliant api-wise. A few calls (those with O_CREAT) need the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 17:35:13 +00:00
Amaury Pouly
57dc493db5
dircache: increase stack size to handle the worse case path during rebuild (dircache->fat->ata-sd-pp+sdhc) and allows directory with depth up to 20 approximately
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25697 a1c6a512-1295-4272-9138-f99709370657
2010-04-22 08:31:10 +00:00
Frank Gevaerts
376d8d577f
Add IO priority handling. Currently all IO has equal priority, except the dircache scanning thread which is lower. This fixes the slow boot problem for me, with the added benefit that actual audio playback also starts faster.
...
Lots of the changes are due to changing storage_(read|write)sectors() from macros to wrapper functions. This means that they have to be called with IF_MD2(drive,) again.
Flyspray: FS#11167
Author: Frank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25459 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 22:02:09 +00:00
Amaury Pouly
4832c3ce42
Fix a dircache NULL-pointer dereference.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24835 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 22:48:54 +00:00
Amaury Pouly
eb54ede182
Fix error handling in dircache generation.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24730 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 19:31:07 +00:00
Amaury Pouly
53b1af7a61
-Cosmetic change in a comparison
...
-Move fat_dir structure out of dircache stack to RAM. Reduce dircache stack size (max level depth should stay be around 20). This should fix nano2g dircache stkov of FS#10679
-Change the structure returned by readdir_cached to match the one returned by readdir_uncached: remove useless fields to save space and avoid any potential incoherence
-Remove one field from the internal structure used by {opend,read,close}dir_cached because it was mostly redundant.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24708 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 22:49:11 +00:00
Amaury Pouly
26c0e753d1
Rewrite dircache generation to take advantage for the FAT code. Reduce RAM usage by ~30Kb and binsize by at least several hundreds bytes. Also remove the directory depth limit of dircache.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24657 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 19:09:52 +00:00
Amaury Pouly
1459bbc45f
Various dircache improvements: reduce size of a path buffer to MAX_PATH and rewrote copy_path to improve stack usage. Also simplified get_entry.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24445 a1c6a512-1295-4272-9138-f99709370657
2010-02-01 23:00:35 +00:00
Amaury Pouly
4b930df35e
Fix a dircache bug (opening a directory opens the first file of that directory). Also clarify the behaviour of dircache_get_entry.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24420 a1c6a512-1295-4272-9138-f99709370657
2010-01-31 17:02:56 +00:00
Maurus Cuelenaere
eab70ca28c
- Split off strip_volume() to a separate file
...
- fix some yellows
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23762 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:39:30 +00:00
Nils Wallménius
3d4701a6e4
FS#10080
...
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Jonathan Gordon
c50eef0582
ok, that was bigger than expected... reduce the max to 12 open dirs as a happy compromise.., If you still have errors rethink your directory layout
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18235 a1c6a512-1295-4272-9138-f99709370657
2008-08-10 13:22:31 +00:00
Jonathan Gordon
eb0137fcb5
"waste" a bit more RAM on targets with more than 8MB so more directories can be opened at the same time (most obvious when you have really deep directory trees)
...
closes FS#6410, FS#6512, FS#6514
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18234 a1c6a512-1295-4272-9138-f99709370657
2008-08-10 12:46:15 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Bertrik Sikken
2843469876
Moved atoi declaration to stdlib.h. Deleted atoi.h
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 16:18:04 +00:00
Bertrik Sikken
db2d61f4ea
Killed unnecessary global variables by making them static.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17184 a1c6a512-1295-4272-9138-f99709370657
2008-04-20 10:24:15 +00:00
Miika Pekkarinen
52d827a26d
FS#7598 - Dircache support for multivolume targets (by Phil Light).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16632 a1c6a512-1295-4272-9138-f99709370657
2008-03-11 19:39:26 +00:00
Miika Pekkarinen
7aedb02fcc
Dircache state should be checked too to make appflags work in every situation.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16082 a1c6a512-1295-4272-9138-f99709370657
2008-01-13 19:20:04 +00:00
Miika Pekkarinen
39c597b5e1
Always check for deleted files, no matter how slow it might be when DB autoupdate is enabled. Also simplified code a bit. Fixed a crash when search is performaed and dircache has been vanished and DB is still exists ram.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16081 a1c6a512-1295-4272-9138-f99709370657
2008-01-13 19:13:37 +00:00
Michael Sevakis
84f5c5c3e3
Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some threading code in IRAM that should be there on PP502x.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 22:00:51 +00:00
Michael Sevakis
a9b2fb5ee3
Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 01:25:17 +00:00
Nicolas Pennequin
fa1e73172e
Correct a dodgy logf call.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14955 a1c6a512-1295-4272-9138-f99709370657
2007-10-02 15:35:12 +00:00
Magnus Holmgren
8620e3e864
Remove redundant remove call, which caused problems in the simulator.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14728 a1c6a512-1295-4272-9138-f99709370657
2007-09-16 11:39:49 +00:00
Jonathan Gordon
e73f287b5a
Fix FS#7679 - modifying files with dircahce enabled doesnt change the access time/date in dircache
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14580 a1c6a512-1295-4272-9138-f99709370657
2007-09-02 13:24:51 +00:00
Kevin Ferrare
011a325e32
Makes apps and plugins interract with directories using a posix-like api instead of calling dircache / simulator functions (no additionnal layer added, only a cosmetic change)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13943 a1c6a512-1295-4272-9138-f99709370657
2007-07-20 17:06:55 +00:00
Steve Bavin
9e107b4835
Tiny fix for an unlikely error path.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13533 a1c6a512-1295-4272-9138-f99709370657
2007-06-01 10:46:52 +00:00
Miika Pekkarinen
7b1e827f0c
Dircache fixes: Stop scanning properly if shutdown is initiated. Require user to re-enable dircache if initialization fails. Don't create statefile unless eeprom settings have been initialized.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13060 a1c6a512-1295-4272-9138-f99709370657
2007-04-07 17:48:51 +00:00
Magnus Holmgren
01a010fd19
Fix several printf-style warnings in logf builds.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12830 a1c6a512-1295-4272-9138-f99709370657
2007-03-18 09:50:53 +00:00
Daniel Ankers
82f9056988
Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 20:06:41 +00:00
Steve Bavin
74db69e240
Fix dircache on simulators
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12175 a1c6a512-1295-4272-9138-f99709370657
2007-02-01 17:15:50 +00:00
Jonathan Gordon
b0d1bb891e
increase the dircache thread size to hopefully stop it StkOv'ing
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12040 a1c6a512-1295-4272-9138-f99709370657
2007-01-17 10:25:11 +00:00
Steve Bavin
12ef310466
Fix lockup of simulator at startup if dircache enabled
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11990 a1c6a512-1295-4272-9138-f99709370657
2007-01-12 11:10:04 +00:00
Miika Pekkarinen
c8a9ca748d
Try to make sure dircache state file on flashed H1xx targets is
...
handled correctly and no old state is never used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11833 a1c6a512-1295-4272-9138-f99709370657
2006-12-22 09:11:09 +00:00
Miika Pekkarinen
c5d57f0aae
Removed the cpu boost tracking debug feature for now because of
...
different kind of problems. Better implementation can be done later.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11665 a1c6a512-1295-4272-9138-f99709370657
2006-12-05 20:01:48 +00:00
Miika Pekkarinen
0dd7ea2d71
Support building tagcache db natively on PC using the core of the
...
Rockbox tagcache database engine. Only host endian support at the
moment and no command line parameters. Mainly for developers for
debugging at the moment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
2006-11-10 08:03:33 +00:00
Steve Bavin
d49c810ec9
Add CPU boost tracker to see where boosts are coming from
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11125 a1c6a512-1295-4272-9138-f99709370657
2006-10-05 10:07:03 +00:00