update to pxt 5 and pxt-common-packages 6 (#934)
* bump pxt * fix build issues * Auto-gen of projects/summary * removing feild editors moved to pxt * various typing fixes * more typing fixes * fixing various typing issues * Start on integration of new pxt * serial number fixes * gc-ify MMap object * Re-build generated files * fix console listeners * clear lf() warnings * More generated files * also auto-generated * Compilation fixes * fix merge * mostly fixing blocks * fix sim * fix field motors * enable a few features * moving to tsx * try to fix edtiro compilation * more defs * removing commands * removing extra $ * fix blockly warning * hiding images * enabling more pxt features * hide images * setup autorun * add lock on target_reset * update deps * return trylock result * updated pxt * rename video section * add alpha channel * upgraded pxt * bump pxt/version * removed alpha ref * var ceanup * don't do major bump
This commit is contained in:
committed by
Peli de Halleux
parent
ba94322d4c
commit
c5cec3a6ba
@ -25,13 +25,20 @@ PXT_VTABLE_CTOR(MMap) {
|
||||
}
|
||||
|
||||
void MMap::print() {
|
||||
DMESG("MMap %p r=%d len=%d fd=%d data=%p", this, refcnt, length, fd, data);
|
||||
DMESG("MMap %p len=%d fd=%d data=%p", this, length, fd, data);
|
||||
}
|
||||
|
||||
void MMap::destroy() {
|
||||
munmap(data, length);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void MMap::scan(MMap *) {}
|
||||
|
||||
unsigned MMap::gcsize(MMap *) {
|
||||
return TOWORDS(sizeof(MMap));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace control {
|
||||
@ -39,8 +46,8 @@ namespace control {
|
||||
/** Create new file mapping in memory */
|
||||
//%
|
||||
MMap *mmap(String filename, int size, int offset) {
|
||||
DMESG("mmap %s len=%d off=%d", filename->data, size, offset);
|
||||
int fd = open(filename->data, O_RDWR, 0);
|
||||
DMESG("mmap %s len=%d off=%d", filename->getUTF8Data(), size, offset);
|
||||
int fd = open(filename->getUTF8Data(), O_RDWR, 0);
|
||||
if (fd < 0)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user