You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fa...@us...> - 2008-05-21 20:34:22
|
Revision: 590 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=590&view=rev Author: fackue Date: 2008-05-21 13:33:31 -0700 (Wed, 21 May 2008) Log Message: ----------- forgot to set a 1.15 back to 1.12 Modified Paths: -------------- kos/utils/dc-chain/unpack.sh Modified: kos/utils/dc-chain/unpack.sh =================================================================== --- kos/utils/dc-chain/unpack.sh 2008-05-21 03:58:01 UTC (rev 589) +++ kos/utils/dc-chain/unpack.sh 2008-05-21 20:33:31 UTC (rev 590) @@ -1,6 +1,6 @@ #!/bin/sh -rm -rf binutils-2.17 gcc-3.4.6 newlib-1.15.0 +rm -rf binutils-2.17 gcc-3.4.6 newlib-1.12.0 tar jxf binutils-2.17.tar.bz2 || exit 1 tar jxf gcc-3.4.6.tar.bz2 || exit 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-21 03:58:18
|
Revision: 589 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=589&view=rev Author: ljsebald Date: 2008-05-20 20:58:01 -0700 (Tue, 20 May 2008) Log Message: ----------- So, uhh... the KOS CHANGELOG hadn't been updated since November of 2003. This commit fixes that issue. Hopefully I didn't miss any important changes (or credit them to the wrong person). Hopefully this will never happen again as it took far too long to go through all the SVN logs to do it after 4 and a half years. Modified Paths: -------------- kos/doc/CHANGELOG Modified: kos/doc/CHANGELOG =================================================================== --- kos/doc/CHANGELOG 2008-05-20 03:05:38 UTC (rev 588) +++ kos/doc/CHANGELOG 2008-05-21 03:58:01 UTC (rev 589) @@ -5,10 +5,11 @@ KallistiOS version 1.3.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Dan Potter == DP] - *** Imported a new version of lwIP, with proper sockets lib [DP] -- DC Added new DC example for Parallax (raster_melt) [DP] +- DC Added new httpd example for lwIP [DP] +- x86 Added incomplete ia32 port [DP] +- DC Added new DC examples for Parallax (raster_melt, sinus, delay_cube, + rotocube) [DP] - *** Added svnpush.py script for pushing repositories on the web [DP] - -KallistiOS version 1.2.1 ----------------------------------------------- - DC Added genmenu module and example in Tsunami [Dan Potter == DP] - DC Added hello-mp3 example [DP] - DC 320x240 PAL mode [mekanaizer == MK] @@ -16,6 +17,142 @@ - *** New addons/ports build system [DP] - *** Moved most addons/ports into their own tree/distribution [DP] - *** Moved several incorrectly placed pieces into libkosutils [DP] +- *** Imported port of Lua 5.0 [DP] +- DC Added Tsunami Matrix class [DP] +- DC Various improvements to Tsunami classes [DP] +- *** Major build system overhaul (see RELNOTES) [DP] +- DC Improved MII/link status handling for BBA driver [DP] +- *** Added NONE thread mode [DP] +- *** lwIP select fixes [Walter van Niftrik == WvN] +- DC GDB stub fixes [Richard Moats == RM] +- *** New bin2c [Gil Megidish == GM] +- *** Updated genromfs [DP] +- DC Fixed and re-enabled SPU DMA module [DP] +- DC Cleaned up PVR DMA functions, adding support for different DMA targets [DP] +- DC Floating point register support for the GDB stub [RM] +- DC Added G2 DMA pausing for G2 bus read/write calls [DP] +- *** Added UDP sendto/recvfrom calls in lwIP [DP] +- DC Added DNS client lwIP example [DP] +- DC Added ISP settings code to flashrom module [Sam Steele == SS, DP] +- DC Added ISP settings example [DP] +- *** Added gethostbyname support to lwIP port [DP] +- DC Updated netcfg to load settings from flashrom [DP] +- DC Cleaned up DC modem code and added new dialing functions [DP] +- DC Store Queue and Matrix translation speed ups [Jim Ursetto = JU] +- DC Support for DMAed vertex buffers in PVR [DP] +- DC Added mat_transform_sq function [JU] +- DC Added modified version of Jim Ursetto's serpent example [DP, JU] +- DC New sound stream manager, sound effect channel addressing support [DP] +- *** Threading fixes for libmp3/liboggvorbisplay/libtremor + [Viktor, Heinrich Tillack == HT] +- *** Added New dbgio system [DP] +- DC Various fixes to support new dbgio system [DP] +- DC Made fsqrt specify fr0 as dirtied [JU] +- *** Updated bin2o to produce properly aligned files [DP] +- DC Added support for setting fsaa at PVR init [DP] +- DC Added mat_trans_nodiv, fipr_magnitude_sqr, and fipr [JU] +- *** Added WORLDVIEW matrix, plx_vert_inpm3, and case-insensitive texture + loading to libparallax [DP] +- *** Added gnu_wrappers (KOS wrappers for GNU tools) [DP] +- DC Fixed enabling of incorrect ASIC event for SPU DMA [Vincent Penne == VP] +- *** Converted everything to use Newlib as libc/libm rather than the old + built-in libc/libm [DP] +- *** Added byte ordering functions to koslib [DP] +- DC Added timer_us_gettime64 function [DP] +- *** Patched things for multi-threaded libstdc++ compilation [JU] +- *** Fixed free(NULL) in debug mode [DP] +- DC Fixed issues with scif_init and dcload-serial support [DP] +- DC Added user-entered date support in syscfg_t [Thierry Vermeylen == TV] +- DC Cleaned up thread usage in libkosh [DP] +- DC Added new kosh example program using conio [DP] +- DC Fixed adventure example for new compilers/newlib [DP] +- DC Added New modem driver (version 1.2) [Nick Kochakian == NK] +- DC Fixed AICA volume setting [JU] +- DC Fixed RLE in gdb_stub [RM] +- DC Fixed an image-garbling bug in vqenc [RM] +- DC Fixed vqenc mipmap generation [RM] +- DC Added support for BBA DMA, Improved SPU DMA support, added generic G2 DMA + functions [VP] +- DC Updated netcfg to support adding a VMU icon [SS] +- DC Added GDB-over-dcload support [RM] +- DC Added support for hard breakpoints/watchpoints using UBC [RM] +- *** Fixed libmp3 sndstream callback's incorrect shifting of the output buffer [RM] +- DC Added synchronized start command for sound [RM] +- *** Fixed Tsunami genmenu's incorrect device ID in debug output [Atani] +- DC Added partial VMUFS fixes [Tursi] +- DC Added block write retrying to VMU driver [Tursi, DP] +- DC Added a fix for issues with inserting/removing purupuru packs [Tursi] +- DC Added support for PVR sprites [Lawrence Sebald == LS] +- *** Added new internal network system (alternative to lwIP) [LS] +- DC Added automatic configuration of the BBA/Lan Adapter from flashrom [LS] +- DC Added support for the maple Microphone peripheral [LS] +- DC Added a purupuru driver that has rumble support [LS] +- DC Added a skeleton Dreameye driver (doesn't do anything useful but it does + make detection work) [LS] +- *** Fixed the newlib patch [WvN] +- *** Added/fixed various addons headers [SS] +- DC Added support for GL_TRIANGLE_FAN in KGL [SS] +- *** Added support for antialiased fonts in libparallax [JU] +- *** Adjusted makejitter makefile to use kos-ports headers [SS] +- DC Fill in dirent.attr for directories in is9660 [SS] +- DC Applied patch for opening correct iso9660 filenames [Christian Groessler == CG] +- DC Fixed bitmask for mouse buttons (makes 3rd button useable) [Fragger] +- DC Added experimental (read: partially working) render to texture support in + the PVR module [LS] +- DC Added example program for render-to-texture [LS] +- *** Made thd_sleep(0) work properly [DP] +- *** Added a fix to ARP handling code so that an error is returned rather than + an incomplete mac address [LS] +- *** Added standard network headers (arpa/inet.h, netinet/in.h, sys/socket.h) [LS] +- *** Added inet_addr function [LS] +- *** Added fs_socket, which implements the standard socket functionality using + the built-in networking code (only UDP supported though) [LS] +- DC Correctly set attr member of dirent_t from dcload_readdir [Anonymous] +- *** Added libmp3 volume control function [Atani] +- *** Added support for '.' and '..' in path names [WvN] +- DC Added in AICA channel position patch [WvN] +- *** Added simple Blender model export plugin [Christian Henz == CH] +- *** Added newlib execve stub [DP] +- *** Made ARP code garbage collection run on each ARP query [LS] +- *** Removed unused net_ntohl/net_ntohs functions [LS] +- DC Added support for polling for packets on the BBA [LS] +- DC Added a short delay after init on the LAN adapter, since mine seems to + crap out if you try to access it too quickly after init [LS] +- *** Made net_ipv4 layer not pass around ethernet headers [LS] +- *** Made net_ipv4 checksum work right for odd byte count messages [LS] +- *** Modify networking code to work properly in an IRQ [LS] +- DC Added glVertex2f support to KGL [Atani] +- *** Added inet_aton, inet_ntoa, inet_ntop, inet_pton functions and made + inet_addr use inet_aton [LS] +- DC Fixed code that did lvalue casts [LS] +- DC Added in sector size patch [Donald Haase == DH] +- *** Use genwait rather than the condvar in the UDP code [LS] +- DC Patched SDL with a patch that was quite old to fix audio and controllers [Bero] +- DC Fixed the SDL timer [OneThirty8 == 138] +- *** Made net_ipv4_send function accept arguments that represent the fields of + the IPv4 header, rather than a structure of the IPv4 header [LS] +- *** Fixed odd-sized messages in the UDP code [LS] +- *** Removed useless debug messages in UDP code [LS] +- DC Added support for rates less than 9600 in SCIF driver [CG] +- *** Handle loopback sends more sanely in net_ipv4 [LS] +- *** Change behavior when a send is attempted to a host that does not have a + cached ARP entry, making sends to new hosts actually work most of the time + on the first try [LS] +- *** Fixed recv/recvfrom in the UDP code to actually unlock the UDP mutex if + they have to wait [LS] +- DC Added fs_dclsocket (dcload over fs_sockets) [LS] +- DC Fixed SDL to not return incorrect mouse buttons [Cyle Terry == CT] +- *** Added implementations of read/write/seek in fs_socket [LS] +- DC Fixed readdir on VMUS when the VMU is empty [CG] +- *** Removed useless getAlpha argument in Tsunami's drawable class [CT] +- *** Added reader/writer semaphores [LS] +- DC Added example program for reader/writer semaphores [LS] +- *** Made Lua use fmodf rather than fmod [Harley Laue == HL] +- *** Fixed memory leak in UDP socket code when the mutex cannot be acquired + and the code is being executed inside an IRQ [LS] +- DC Added support for VMU beeping [DH] +- *** Added support for upgrading a read lock on a reader/writer semaphore to + a write lock [LS] KallistiOS version 1.2.0 ----------------------------------------------- - DC Fix to use DCARM7_CFLAGS when compiling ARM driver [Christian Groessler == CG] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-20 03:05:51
|
Revision: 588 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=588&view=rev Author: ljsebald Date: 2008-05-19 20:05:38 -0700 (Mon, 19 May 2008) Log Message: ----------- Add support for "upgrading" a reader/writer semaphore from a read lock to a write lock. Modified Paths: -------------- kos/include/kos/rwsem.h kos/kernel/thread/rwsem.c Modified: kos/include/kos/rwsem.h =================================================================== --- kos/include/kos/rwsem.h 2008-05-20 02:45:34 UTC (rev 587) +++ kos/include/kos/rwsem.h 2008-05-20 03:05:38 UTC (rev 588) @@ -71,6 +71,17 @@ EWOULDBLOCK - would block */ int rwsem_write_trylock(rw_semaphore_t *s); +/* "Upgrade" a read lock to a write lock. Returns -1 on error. + EPERM - called inside an interrupt + EINTR - was interrupted */ +int rwsem_read_upgrade(rw_semaphore_t *s); + +/* Attempt to upgrade a read lock to a write lock. If the call to + rwsem_read_upgrade() would normally block, return -1 for error. + Note that on error, the read lock is still held. + EWOULDBLOCK - would block */ +int rwsem_read_tryupgrade(rw_semaphore_t *s); + /* Return the reader/writer semaphore reader count */ int rwsem_read_count(rw_semaphore_t *s); Modified: kos/kernel/thread/rwsem.c =================================================================== --- kos/kernel/thread/rwsem.c 2008-05-20 02:45:34 UTC (rev 587) +++ kos/kernel/thread/rwsem.c 2008-05-20 03:05:38 UTC (rev 588) @@ -201,6 +201,60 @@ return rv; } +/* "Upgrade" a read lock to a write lock. */ +int rwsem_read_upgrade(rw_semaphore_t *s) { + int old, rv = 0; + + if(irq_inside_int()) { + dbglog(DBG_WARNING, "rwsem_read_upgrade: called inside interrupt\n"); + errno = EPERM; + return -1; + } + + old = irq_disable(); + + --s->read_count; + + /* If there are still other readers, wait patiently for our turn. */ + if(s->read_count) { + rv = genwait_wait(&s->write_lock, "rwsem_read_upgrade", 0, NULL); + + if(rv < 0) { + assert(errno == EINTR); + rv = -1; + } + else { + s->write_lock = 1; + } + } + else { + s->write_lock = 1; + } + + irq_restore(old); + return rv; +} + +/* Attempt to upgrade a read lock to a write lock, but do not block. */ +int rwsem_read_tryupgrade(rw_semaphore_t *s) { + int old, rv; + + old = irq_disable(); + + if(s->read_count != 1) { + rv = -1; + errno = EWOULDBLOCK; + } + else { + rv = 0; + s->read_count = 0; + s->write_lock = 1; + } + + irq_restore(old); + return rv; +} + /* Return the current reader count */ int rwsem_read_count(rw_semaphore_t *s) { return s->read_count; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-20 02:45:52
|
Revision: 587 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=587&view=rev Author: ljsebald Date: 2008-05-19 19:45:34 -0700 (Mon, 19 May 2008) Log Message: ----------- Adding in VMU beeping support as written by Donald Haase (Tracker item #1961770). Modified Paths: -------------- kos/kernel/arch/dreamcast/hardware/maple/vmu.c kos/kernel/arch/dreamcast/include/dc/maple/vmu.h Modified: kos/kernel/arch/dreamcast/hardware/maple/vmu.c =================================================================== --- kos/kernel/arch/dreamcast/hardware/maple/vmu.c 2008-05-20 02:22:51 UTC (rev 586) +++ kos/kernel/arch/dreamcast/hardware/maple/vmu.c 2008-05-20 02:45:34 UTC (rev 587) @@ -2,6 +2,7 @@ vmu.c Copyright (C)2002,2003 Dan Potter + Copyright (C)2008 Donald Haase */ #include <assert.h> @@ -51,8 +52,8 @@ /* These interfaces will probably change eventually, but for now they can stay the same */ -/* Completion callback for the draw_lcd function below */ -static void draw_lcd_callback(maple_frame_t * frame) { +/* Callback that unlocks the frame, general use */ +static void vmu_gen_callback(maple_frame_t * frame) { /* Unlock the frame for the next usage */ maple_frame_unlock(frame); @@ -60,6 +61,47 @@ genwait_wake_all(frame); } +/* Set the tone to be generated by the VMU's speaker. + Only last two bytes are used. Actual parameters unknown + except that the last byte must be larger than the second + to last byte. This might necessitate refactoring as the + clock is a seperate device from the screen and storage. */ +int vmu_beep_raw(maple_device_t * dev, uint32 beep) { + uint32 * send_buf; + + assert( dev != NULL ); + + /* Lock the frame */ + if (maple_frame_lock(&dev->frame) < 0) + return MAPLE_EAGAIN; + + /* Reset the frame */ + maple_frame_init(&dev->frame); + send_buf = (uint32 *)dev->frame.recv_buf; + send_buf[0] = MAPLE_FUNC_CLOCK; + send_buf[1] = beep; + dev->frame.cmd = MAPLE_COMMAND_SETCOND; + dev->frame.dst_port = dev->port; + dev->frame.dst_unit = dev->unit; + dev->frame.length = 2; + dev->frame.callback = vmu_gen_callback; + dev->frame.send_buf = send_buf; + maple_queue_frame(&dev->frame); + + /* Wait for the timer to accept it */ + if(genwait_wait(&dev->frame, "vmu_beep_raw", 500, NULL) < 0) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { + /* Something went wrong.... */ + dev->frame.state = MAPLE_FRAME_VACANT; + dbglog(DBG_ERROR, "vmu_beep_raw: timeout to unit %c%c, beep: %lu\n", + dev->port + 'A', dev->unit + '0', beep); + return MAPLE_ETIMEOUT; + } + } + + return MAPLE_EOK; +} + /* Draw a 1-bit bitmap on the LCD screen (48x32). return a -1 if an error occurs */ int vmu_draw_lcd(maple_device_t * dev, void *bitmap) { @@ -81,7 +123,7 @@ dev->frame.dst_port = dev->port; dev->frame.dst_unit = dev->unit; dev->frame.length = 2 + 48; - dev->frame.callback = draw_lcd_callback; + dev->frame.callback = vmu_gen_callback; dev->frame.send_buf = send_buf; maple_queue_frame(&dev->frame); Modified: kos/kernel/arch/dreamcast/include/dc/maple/vmu.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/maple/vmu.h 2008-05-20 02:22:51 UTC (rev 586) +++ kos/kernel/arch/dreamcast/include/dc/maple/vmu.h 2008-05-20 02:45:34 UTC (rev 587) @@ -1,7 +1,8 @@ /* KallistiOS ##version## dc/maple/vmu.h - (C)2000-2002 Jordan DeLong and Dan Potter + Copyright (C)2000-2002 Jordan DeLong and Dan Potter + Copyright (C)2008 Donald Haase $Id: vmu.h,v 1.3 2002/09/04 03:38:42 bardtx Exp $ @@ -15,6 +16,7 @@ #include <arch/types.h> +int vmu_beep_raw(maple_device_t * dev, uint32 beep); int vmu_draw_lcd(maple_device_t * dev, void *bitmap); int vmu_block_read(maple_device_t * dev, uint16 blocknum, uint8 *buffer); int vmu_block_write(maple_device_t * dev, uint16 blocknum, uint8 *buffer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-20 02:23:01
|
Revision: 586 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=586&view=rev Author: ljsebald Date: 2008-05-19 19:22:51 -0700 (Mon, 19 May 2008) Log Message: ----------- Fix an extremely unlikely memory leak in the UDP sockets code. (Who would ever try to create a new socket in an interupt anyway?) Modified Paths: -------------- kos/kernel/net/net_udp.c Modified: kos/kernel/net/net_udp.c =================================================================== --- kos/kernel/net/net_udp.c 2008-05-19 17:01:55 UTC (rev 585) +++ kos/kernel/net/net_udp.c 2008-05-20 02:22:51 UTC (rev 586) @@ -525,6 +525,7 @@ if(irq_inside_int()) { if(mutex_trylock(udp_mutex) == -1) { + free(udpsock); errno = EWOULDBLOCK; return -1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-19 17:02:50
|
Revision: 585 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=585&view=rev Author: lostgeneration Date: 2008-05-19 10:01:55 -0700 (Mon, 19 May 2008) Log Message: ----------- Standard fmod uses double, so fmodf is more correct (and fixes linker error) Modified Paths: -------------- kos-ports/lua/src/lib/lmathlib.c Modified: kos-ports/lua/src/lib/lmathlib.c =================================================================== --- kos-ports/lua/src/lib/lmathlib.c 2008-05-19 15:28:34 UTC (rev 584) +++ kos-ports/lua/src/lib/lmathlib.c 2008-05-19 17:01:55 UTC (rev 585) @@ -86,7 +86,7 @@ } static int math_mod (lua_State *L) { - lua_pushnumber(L, fmod(luaL_checknumber(L, 1), luaL_checknumber(L, 2))); + lua_pushnumber(L, fmodf(luaL_checknumber(L, 1), luaL_checknumber(L, 2))); return 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-19 15:28:49
|
Revision: 584 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=584&view=rev Author: ljsebald Date: 2008-05-19 08:28:34 -0700 (Mon, 19 May 2008) Log Message: ----------- Oops... forgot a few things. Modified Paths: -------------- kos/include/kos.h kos/kernel/thread/thread.c Modified: kos/include/kos.h =================================================================== --- kos/include/kos.h 2008-05-19 15:23:23 UTC (rev 583) +++ kos/include/kos.h 2008-05-19 15:28:34 UTC (rev 584) @@ -29,6 +29,7 @@ #include <kos/limits.h> #include <kos/thread.h> #include <kos/sem.h> +#include <kos/rwsem.h> #include <kos/mutex.h> #include <kos/cond.h> #include <kos/genwait.h> Modified: kos/kernel/thread/thread.c =================================================================== --- kos/kernel/thread/thread.c 2008-05-19 15:23:23 UTC (rev 583) +++ kos/kernel/thread/thread.c 2008-05-19 15:28:34 UTC (rev 584) @@ -12,6 +12,7 @@ #include <reent.h> #include <kos/thread.h> #include <kos/sem.h> +#include <kos/rwsem.h> #include <kos/cond.h> #include <kos/genwait.h> #include <arch/irq.h> @@ -769,6 +770,7 @@ /* Initialize thread sync primitives */ genwait_init(); + rwsem_init(); sem_init(); cond_init(); @@ -809,6 +811,7 @@ } /* Shutdown thread sync primitives */ + rwsem_shutdown(); sem_shutdown(); cond_shutdown(); genwait_shutdown(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-05-19 15:23:47
|
Revision: 583 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=583&view=rev Author: ljsebald Date: 2008-05-19 08:23:23 -0700 (Mon, 19 May 2008) Log Message: ----------- Adding in a new synchronization primitive: reader/writer semaphores, along with an example program for them. Modified Paths: -------------- kos/examples/dreamcast/basic/threading/Makefile kos/kernel/thread/Makefile Added Paths: ----------- kos/examples/dreamcast/basic/threading/rwsem/ kos/examples/dreamcast/basic/threading/rwsem/Makefile kos/examples/dreamcast/basic/threading/rwsem/rwsem_test.c kos/include/kos/rwsem.h kos/kernel/thread/rwsem.c Modified: kos/examples/dreamcast/basic/threading/Makefile =================================================================== --- kos/examples/dreamcast/basic/threading/Makefile 2008-05-19 14:49:36 UTC (rev 582) +++ kos/examples/dreamcast/basic/threading/Makefile 2008-05-19 15:23:23 UTC (rev 583) @@ -7,11 +7,14 @@ all: $(KOS_MAKE) -C general + $(KOS_MAKE) -C rwsem clean: $(KOS_MAKE) -C general clean + $(KOS_MAKE) -C rwsem clean dist: $(KOS_MAKE) -C general dist + $(KOS_MAKE) -C rwsem dist Added: kos/examples/dreamcast/basic/threading/rwsem/Makefile =================================================================== --- kos/examples/dreamcast/basic/threading/rwsem/Makefile (rev 0) +++ kos/examples/dreamcast/basic/threading/rwsem/Makefile 2008-05-19 15:23:23 UTC (rev 583) @@ -0,0 +1,29 @@ +# KallistiOS ##version## +# +# basic/threading/rwsem/Makefile +# Copyright (C) 2008 Lawrence Sebald +# + +all: rm-elf rwsem_test.elf + +include $(KOS_BASE)/Makefile.rules + +OBJS = rwsem_test.o + +clean: rm-elf + -rm -f $(OBJS) + +rm-elf: + -rm -f rwsem_test.elf + +rwsem_test.elf: $(OBJS) + $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o rwsem_test.elf $(KOS_START) \ + $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) + + +run: rwsem_test.elf + $(KOS_LOADER) rwsem_test.elf + +dist: + rm -f $(OBJS) + $(KOS_STRIP) rwsem_test.elf \ No newline at end of file Added: kos/examples/dreamcast/basic/threading/rwsem/rwsem_test.c =================================================================== --- kos/examples/dreamcast/basic/threading/rwsem/rwsem_test.c (rev 0) +++ kos/examples/dreamcast/basic/threading/rwsem/rwsem_test.c 2008-05-19 15:23:23 UTC (rev 583) @@ -0,0 +1,146 @@ +/* KallistiOS ##version## + + rwsem_test.c + Copyright (C) 2008 Lawrence Sebald + +*/ + +/* This program is a test of the reader/writer semaphores added in KOS 1.3.0. + Basically, what a reader/writer semaphore does is it allows unlimited readers + to occupy their critical sections, while guaranteeing exclusive access to + writers. This is a concept that I picked up from my undergraduate operating + systems class that I figured would probably be useful for KOS. */ + +#include <stdio.h> + +#include <kos/thread.h> +#include <kos/rwsem.h> + +#include <arch/arch.h> +#include <dc/maple.h> +#include <dc/maple/controller.h> + +#define UNUSED __attribute__((unused)) + +rw_semaphore_t *s = NULL; +uint32 number = 0; + +void writer0(void *param UNUSED) { + int i; + + for(i = 0; i < 20; ++i) { + if(rwsem_write_lock(s)) { + printf("Writer 0 could not obtain write lock!\n"); + return; + } + + printf("Writer 0 obtained write lock\n"); + number += 8; + rwsem_write_unlock(s); + + thd_sleep(10); + } + + printf("Writer 0 done\n"); +} + +void writer1(void *param UNUSED) { + int i; + + for(i = 0; i < 17; ++i) { + if(rwsem_write_lock(s)) { + printf("Writer 1 could not obtain write lock!\n"); + return; + } + + printf("Writer 1 obtained write lock\n"); + number *= 3; + rwsem_write_unlock(s); + + thd_sleep(5); + } + + printf("Writer 1 done\n"); +} + +void reader0(void *param UNUSED) { + int i; + + for(i = 0; i < 12; ++i) { + if(rwsem_read_lock(s)) { + printf("Reader 0 could not obtain read lock!\n"); + return; + } + + printf("Reader 0 obtained read lock\n"); + printf("Number: %lu\n", number); + rwsem_read_unlock(s); + + thd_sleep(20); + } + + printf("Reader 0 done\n"); +} + +void reader1(void *param UNUSED) { + int i; + + for(i = 0; i < 23; ++i) { + if(rwsem_read_lock(s)) { + printf("Reader 1 could not obtain read lock!\n"); + return; + } + + printf("Reader 1 obtained read lock\n"); + printf("Number * 2: %lu\n", number * 2); + rwsem_read_unlock(s); + + thd_sleep(16); + } + + printf("Reader 1 done\n"); +} + +KOS_INIT_FLAGS(INIT_DEFAULT); +int main(int argc, char *argv[]) { + kthread_t *w0, *w1, *r0, *r1; + + /* Exit if the user presse all buttons at once. */ + cont_btn_callback(0, CONT_START | CONT_A | CONT_B | CONT_X | CONT_Y, + arch_exit); + + printf("KallistiOS Reader/Writer Semaphore test program\n"); + + /* Create the reader/writer semaphore that will be used. */ + s = rwsem_create(); + + if(!s) { + printf("Could not create RW semaphore, bailing out!\n"); + arch_exit(); + } + + printf("About to create threads\n"); + w0 = thd_create(writer0, NULL); + w1 = thd_create(writer1, NULL); + r0 = thd_create(reader0, NULL); + r1 = thd_create(reader1, NULL); + + printf("About to sleep\n"); + thd_wait(w0); + thd_wait(w1); + thd_wait(r0); + thd_wait(r1); + + if(rwsem_read_lock(s)) { + printf("Could not obtain final read lock!\n"); + arch_exit(); + } + + printf("Final number: %lu\n", number); + + rwsem_read_unlock(s); + rwsem_destroy(s); + + printf("Reader/Writer semaphore tests completed successfully!\n"); + return 0; +} Added: kos/include/kos/rwsem.h =================================================================== --- kos/include/kos/rwsem.h (rev 0) +++ kos/include/kos/rwsem.h 2008-05-19 15:23:23 UTC (rev 583) @@ -0,0 +1,86 @@ +/* KallistiOS ##version## + + include/kos/rwsem.h + Copyright (C) 2008 Lawrence Sebald + +*/ + +/* This file defines a concept that might be familiar to anyone who's ever + hacked around on the Linux kernel a bit: reader/writer semaphores. Basically, + reader/writer semaphores allow an unlimitted readers to occupy the critical + section at any given time. Since readers, by definition, do not change any + data other than their own local variables this should in theory be safe. + Writers on the other hand require exclusive access to the critical section. + Writers only may proceed into the critical section if the write lock is not + held on the semaphore and if there are no readers currently in the critical + section. Also, no reader will be allowed into the critical section if the + write lock is held. */ + +#ifndef __KOS_RWSEM_H +#define __KOS_RWSEM_H + +#include <sys/cdefs.h> +__BEGIN_DECLS + +#include <sys/queue.h> + +/* Reader/writer semaphore structure */ +typedef struct rw_semaphore { + /* List entry for the global list of reader/writer semaphores */ + LIST_ENTRY(rw_semaphore) list; + + /* How many readers currently hold the semaphore lock? */ + int read_count; + + /* Does a writer currently hold the lock? */ + int write_lock; +} rw_semaphore_t; + +LIST_HEAD(rwsemlist, rw_semaphore); + +/* Allocate a new reader/writer semaphore. Returns NULL on failure. + ENOMEM - Out of memory */ +rw_semaphore_t *rwsem_create(); + +/* Destroy a reader/writer semaphore */ +void rwsem_destroy(rw_semaphore_t *s); + +/* Lock a reader/writer semaphore for reading. Returns -1 on error. + EPERM - called inside an interrupt + EINTR - was interrupted */ +int rwsem_read_lock(rw_semaphore_t *s); + +/* Lock a reader/writer semaphore for writing. Returns -1 on error. + EPERM - called inside an interrupt + EINTR - was interrupted */ +int rwsem_write_lock(rw_semaphore_t *s); + +/* Unlock a reader/writer semaphore from a read lock. Returns -1 on error. */ +int rwsem_read_unlock(rw_semaphore_t *s); + +/* Unlock a reader/writer semaphore from a write lock. Returns -1 on error. */ +int rwsem_write_unlock(rw_semaphore_t *s); + +/* Attempt to lock a reader/writer semaphore for reading. If the call to + rwsem_read_lock() would normally block, return -1 for error. + EWOULDBLOCK - would block */ +int rwsem_read_trylock(rw_semaphore_t *s); + +/* Attempt to lock a reader/writer semaphore for writing. If the call to + rwsem_write_lock() would normally block, return -1 for error. + EWOULDBLOCK - would block */ +int rwsem_write_trylock(rw_semaphore_t *s); + +/* Return the reader/writer semaphore reader count */ +int rwsem_read_count(rw_semaphore_t *s); + +/* Return the reader/writer semaphore write lock status */ +int rwsem_write_locked(rw_semaphore_t *s); + +/* Init / shutdown */ +int rwsem_init(); +void rwsem_shutdown(); + +__END_DECLS + +#endif /* __KOS_RWSEM_H */ Modified: kos/kernel/thread/Makefile =================================================================== --- kos/kernel/thread/Makefile 2008-05-19 14:49:36 UTC (rev 582) +++ kos/kernel/thread/Makefile 2008-05-19 15:23:23 UTC (rev 583) @@ -6,7 +6,7 @@ # $Id: Makefile,v 1.4 2003/02/14 08:25:07 bardtx Exp $ OBJS = sem.o cond.o mutex.o genwait.o -OBJS += thread.o +OBJS += thread.o rwsem.o SUBDIRS = include $(KOS_BASE)/Makefile.prefab Added: kos/kernel/thread/rwsem.c =================================================================== --- kos/kernel/thread/rwsem.c (rev 0) +++ kos/kernel/thread/rwsem.c 2008-05-19 15:23:23 UTC (rev 583) @@ -0,0 +1,224 @@ +/* KallistiOS ##version## + + rwsem.c + Copyright (C) 2008 Lawrence Sebald +*/ + +/* Defines reader/writer semaphores */ + +#include <malloc.h> +#include <stdio.h> +#include <assert.h> +#include <errno.h> +#include <sys/queue.h> + +#include <kos/rwsem.h> +#include <kos/genwait.h> +#include <arch/spinlock.h> + +/* Reader/writer semaphore list spinlock */ +static spinlock_t mutex; + +/* Global list of reader/writer semaphores */ +static struct rwsemlist rwsem_list; + +/* Allocate a new reader/writer semaphore */ +rw_semaphore_t *rwsem_create() { + rw_semaphore_t *s; + + s = (rw_semaphore_t *)malloc(sizeof(rw_semaphore_t)); + if(!s) { + errno = ENOMEM; + return NULL; + } + + s->read_count = 0; + s->write_lock = 0; + + spinlock_lock(&mutex); + LIST_INSERT_HEAD(&rwsem_list, s, list); + spinlock_unlock(&mutex); + + return s; +} + +/* Destroy a reader/writer semaphore */ +void rwsem_destroy(rw_semaphore_t *s) { + /* XXXX: Should really cause anyone waiting to get an error back on their + wait... hmm. */ + spinlock_lock(&mutex); + LIST_REMOVE(s, list); + spinlock_unlock(&mutex); + + free(s); +} + +/* Lock a reader/writer semaphore for reading */ +int rwsem_read_lock(rw_semaphore_t *s) { + int old, rv = 0; + + if(irq_inside_int()) { + dbglog(DBG_WARNING, "rwsem_read_lock: called inside interrupt\n"); + errno = EPERM; + return -1; + } + + old = irq_disable(); + + /* If the write lock is not held, let the thread proceed */ + if(!s->write_lock) { + ++s->read_count; + } + else { + /* Block until the write lock is not held any more */ + rv = genwait_wait(s, "rwsem_read_lock", 0, NULL); + + if(rv < 0) { + assert(errno == EINTR); + rv = -1; + } + else { + ++s->read_count; + } + } + + irq_restore(old); + return rv; +} + +/* Lock a reader/writer semaphore for writing */ +int rwsem_write_lock(rw_semaphore_t *s) { + int old, rv = 0; + + if(irq_inside_int()) { + dbglog(DBG_WARNING, "rwsem_write_lock: called inside interrupt\n"); + errno = EPERM; + return -1; + } + + old = irq_disable(); + + /* If the write lock is not held and there are no readers in their critical + sections, let the thread proceed. */ + if(!s->write_lock && !s->read_count) { + s->write_lock = 1; + } + else { + /* Block until the write lock is not held and there are no readers + inside their critical sections */ + rv = genwait_wait(&s->write_lock, "rwsem_write_lock", 0, NULL); + + if(rv < 0) { + assert(errno == EINTR); + rv = -1; + } + else { + s->write_lock = 1; + } + } + + irq_restore(old); + return rv; +} + +/* Unlock a reader/writer semaphore from a read lock. */ +int rwsem_read_unlock(rw_semaphore_t *s) { + int old; + + old = irq_disable(); + + --s->read_count; + + /* If this was the last reader, attempt to wake any writers waiting. */ + if(!s->read_count) { + genwait_wake_one(&s->write_lock); + } + + irq_restore(old); + + return 0; +} + +/* Unlock a reader/writer semaphore from a write lock. */ +int rwsem_write_unlock(rw_semaphore_t *s) { + int old, woken; + + old = irq_disable(); + + s->write_lock = 0; + + /* Give writers priority, attempt to wake any writers first. */ + woken = genwait_wake_cnt(&s->write_lock, 1); + + if(!woken) { + /* No writers were waiting, wake up any readers. */ + genwait_wake_all(s); + } + + irq_restore(old); + + return 0; +} + +/* Attempt to lock a reader/writer semaphore for reading, but do not block. */ +int rwsem_read_trylock(rw_semaphore_t *s) { + int old, rv; + + old = irq_disable(); + + /* Is the write lock held? */ + if(s->write_lock) { + rv = -1; + errno = EWOULDBLOCK; + } + else { + rv = 0; + ++s->read_count; + } + + irq_restore(old); + return rv; +} + +/* Attempt to lock a reader/writer semaphore for writing, but do not block. */ +int rwsem_write_trylock(rw_semaphore_t *s) { + int old, rv; + + old = irq_disable(); + + /* Are there any readers in their critical sections, or is the write lock + already held, if so we can't do anything about that now. */ + if(s->read_count || s->write_lock) { + rv = -1; + errno = EWOULDBLOCK; + } + else { + rv = 0; + s->write_lock = 1; + } + + irq_restore(old); + return rv; +} + +/* Return the current reader count */ +int rwsem_read_count(rw_semaphore_t *s) { + return s->read_count; +} + +/* Return the current status of the write lock */ +int rwsem_write_locked(rw_semaphore_t *s) { + return s->write_lock; +} + +/* Initialize reader/writer semaphores */ +int rwsem_init() { + LIST_INIT(&rwsem_list); + spinlock_init(&mutex); + return 0; +} + +/* Shut down reader/writer semaphores */ +void rwsem_shutdown() { + /* XXXX: Do something useful */ +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-19 14:49:54
|
Revision: 582 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=582&view=rev Author: lostgeneration Date: 2008-05-19 07:49:36 -0700 (Mon, 19 May 2008) Log Message: ----------- When is an unsigned char ever less than zero? Removeved an uneeded comparison that would always be true. Modified Paths: -------------- kos/kernel/arch/dreamcast/hardware/modem/modem.c Modified: kos/kernel/arch/dreamcast/hardware/modem/modem.c =================================================================== --- kos/kernel/arch/dreamcast/hardware/modem/modem.c 2008-05-18 23:53:13 UTC (rev 581) +++ kos/kernel/arch/dreamcast/hardware/modem/modem.c 2008-05-19 14:49:36 UTC (rev 582) @@ -109,7 +109,7 @@ void modemCreateCInfoFromPS(const unsigned char protocol, const unsigned char speed, MODEM_CINFO *cInfo) { - assert(speed >= 0 && speed <= 15); + assert(speed <= 15); cInfo->protocol = protocol; cInfo->speed = speed; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-18 23:53:19
|
Revision: 581 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=581&view=rev Author: lostgeneration Date: 2008-05-18 16:53:13 -0700 (Sun, 18 May 2008) Log Message: ----------- Opps, typo Modified Paths: -------------- kos/utils/gnu_wrappers/kos-objcopy Modified: kos/utils/gnu_wrappers/kos-objcopy =================================================================== --- kos/utils/gnu_wrappers/kos-objcopy 2008-05-18 23:50:12 UTC (rev 580) +++ kos/utils/gnu_wrappers/kos-objcopy 2008-05-18 23:53:13 UTC (rev 581) @@ -9,7 +9,7 @@ if [ $i == binary -a $OBJOUT == 1 ];then RMSTACK="-R.stack" fi - if [ $i == "-Obinary" ];the + if [ $i == "-Obinary" ];then RMSTACK="-R.stack" fi done This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-18 23:50:14
|
Revision: 580 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=580&view=rev Author: lostgeneration Date: 2008-05-18 16:50:12 -0700 (Sun, 18 May 2008) Log Message: ----------- Applied patch that removes .stack during kos-objcopy. sh-elf-objcopy still generates incorrect binaries from sh-elf. So this is required IMO. Modified Paths: -------------- kos/utils/gnu_wrappers/kos-objcopy Modified: kos/utils/gnu_wrappers/kos-objcopy =================================================================== --- kos/utils/gnu_wrappers/kos-objcopy 2008-05-17 06:38:59 UTC (rev 579) +++ kos/utils/gnu_wrappers/kos-objcopy 2008-05-18 23:50:12 UTC (rev 580) @@ -1,3 +1,17 @@ #!/bin/sh -exec ${KOS_OBJCOPY} "$@" +OBJOUT=0 + +for i in $@; do + if [ $i == "-O" ];then + OBJOUT=1 + fi + if [ $i == binary -a $OBJOUT == 1 ];then + RMSTACK="-R.stack" + fi + if [ $i == "-Obinary" ];the + RMSTACK="-R.stack" + fi +done + +${KOS_OBJCOPY} $RMSTACK $@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-05-17 06:39:08
|
Revision: 579 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=579&view=rev Author: fackue Date: 2008-05-16 23:38:59 -0700 (Fri, 16 May 2008) Log Message: ----------- kmg.h and zlib fixed in kmgenc Modified Paths: -------------- kos/utils/kmgenc/Makefile kos/utils/kmgenc/kmgenc.h Modified: kos/utils/kmgenc/Makefile =================================================================== --- kos/utils/kmgenc/Makefile 2008-05-17 06:27:13 UTC (rev 578) +++ kos/utils/kmgenc/Makefile 2008-05-17 06:38:59 UTC (rev 579) @@ -2,7 +2,7 @@ # Makefile for the kmgenc program. CFLAGS = -O2 -Wall -DINLINE=inline #-g# -LDFLAGS = -s -lpng -ljpeg #-g +LDFLAGS = -s -lpng -ljpeg -lz #-g all: kmgenc Modified: kos/utils/kmgenc/kmgenc.h =================================================================== --- kos/utils/kmgenc/kmgenc.h 2008-05-17 06:27:13 UTC (rev 578) +++ kos/utils/kmgenc/kmgenc.h 2008-05-17 06:38:59 UTC (rev 579) @@ -12,7 +12,7 @@ // For outputting KMG files #define NEED_KOS_TYPES -#include "../../addons/include/kmg/kmg.h" +#include "../../../kos-ports/include/kmg/kmg.h" // A single color value typedef struct fcolor { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-05-17 06:27:18
|
Revision: 578 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=578&view=rev Author: fackue Date: 2008-05-16 23:27:13 -0700 (Fri, 16 May 2008) Log Message: ----------- removed unnecessary getAlpha argument Modified Paths: -------------- kos-ports/libtsunami/include/drawable.h Modified: kos-ports/libtsunami/include/drawable.h =================================================================== --- kos-ports/libtsunami/include/drawable.h 2008-05-17 05:57:01 UTC (rev 577) +++ kos-ports/libtsunami/include/drawable.h 2008-05-17 06:27:13 UTC (rev 578) @@ -1,6 +1,6 @@ -/* +/* Tsunami for KallistiOS ##version## - + drawable.h (c)2002 Dan Potter @@ -33,7 +33,7 @@ void animRemoveAll(); /// Checks to see if this object is still not finished (for screen - /// closing type stuff). Returns true if this object and all + /// closing type stuff). Returns true if this object and all /// sub-objects are finished. bool isFinished(); @@ -80,7 +80,7 @@ /// stored as the w value. void setRotate(const Vector & r) { m_rotate = r; } - /// Get the rotation of this drawable; the angle is + /// Get the rotation of this drawable; the angle is /// stored as the w value. const Vector & getRotate() const { return m_rotate; } @@ -100,7 +100,7 @@ void setAlpha(float a) { m_tint.a = a; } /// Shortcut to get the alpha value of the tint - float getAlpha(float a) const { return m_tint.a; } + float getAlpha() const { return m_tint.a; } /// Get the absolute tint value of this drawable (figuring prelative) Color getColor() const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-17 05:57:06
|
Revision: 577 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=577&view=rev Author: lostgeneration Date: 2008-05-16 22:57:01 -0700 (Fri, 16 May 2008) Log Message: ----------- Created 1.3.x branch for KOS Ports Added Paths: ----------- branches/kos-ports/1.3.x/ Copied: branches/kos-ports/1.3.x (from rev 576, kos-ports) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2008-05-17 05:55:29
|
Revision: 576 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=576&view=rev Author: lostgeneration Date: 2008-05-16 22:55:25 -0700 (Fri, 16 May 2008) Log Message: ----------- Created 1.3.x branch for KOS Added Paths: ----------- branches/kos/1.3.x/ Copied: branches/kos/1.3.x (from rev 575, kos) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2008-05-05 22:51:51
|
Revision: 575 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=575&view=rev Author: sannyx Date: 2008-05-05 15:51:41 -0700 (Mon, 05 May 2008) Log Message: ----------- readdir: handle case if VMU is completely empty Modified Paths: -------------- kos/kernel/arch/dreamcast/fs/fs_vmu.c kos/kernel/arch/dreamcast/fs/vmufs.c Modified: kos/kernel/arch/dreamcast/fs/fs_vmu.c =================================================================== --- kos/kernel/arch/dreamcast/fs/fs_vmu.c 2008-05-05 22:15:16 UTC (rev 574) +++ kos/kernel/arch/dreamcast/fs/fs_vmu.c 2008-05-05 22:51:41 UTC (rev 575) @@ -298,7 +298,8 @@ switch (fh->strtype) { case VMU_DIR: { vmu_dh_t * dir = (vmu_dh_t *)hnd; - free(dir->dirblocks); + if (dir->dirblocks) + free(dir->dirblocks); break; } Modified: kos/kernel/arch/dreamcast/fs/vmufs.c =================================================================== --- kos/kernel/arch/dreamcast/fs/vmufs.c 2008-05-05 22:15:16 UTC (rev 574) +++ kos/kernel/arch/dreamcast/fs/vmufs.c 2008-05-05 22:51:41 UTC (rev 575) @@ -588,7 +588,7 @@ /* Resize the buffer to match the number of entries */ *outcnt = dircnt; *outbuf = (vmu_dir_t *)realloc(dir, dircnt * sizeof(vmu_dir_t)); - if (!*outbuf) { + if (!*outbuf && dircnt) { dbglog(DBG_ERROR, "vmufs_readdir: can't realloc %d bytes for dir on device %c%c\n", dircnt * sizeof(vmu_dir_t), dev->port+'A', dev->unit+'0'); free(dir); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2008-05-05 22:15:45
|
Revision: 574 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=574&view=rev Author: sannyx Date: 2008-05-05 15:15:16 -0700 (Mon, 05 May 2008) Log Message: ----------- fix debug messages Modified Paths: -------------- kos/kernel/arch/dreamcast/fs/vmufs.c Modified: kos/kernel/arch/dreamcast/fs/vmufs.c =================================================================== --- kos/kernel/arch/dreamcast/fs/vmufs.c 2008-05-02 16:06:18 UTC (rev 573) +++ kos/kernel/arch/dreamcast/fs/vmufs.c 2008-05-05 22:15:16 UTC (rev 574) @@ -490,9 +490,9 @@ /* Check to make sure this is a valid device right now */ if (!dev || !(dev->info.functions & MAPLE_FUNC_MEMCARD)) { if (!dev) - dbglog(DBG_ERROR, "vmufs_readdir: device is invalid\n"); + dbglog(DBG_ERROR, "vmufs_setup: device is invalid\n"); else - dbglog(DBG_ERROR, "vmufs_readdir: device %c%c is not a memory card\n", + dbglog(DBG_ERROR, "vmufs_setup: device %c%c is not a memory card\n", dev->port+'A', dev->unit+'0'); return -1; } @@ -508,7 +508,7 @@ *dirsize = vmufs_dir_blocks(root); *dir = (vmu_dir_t *)malloc(*dirsize); if (!*dir) { - dbglog(DBG_ERROR, "vmufs_readdir: can't alloc %d bytes for dir on device %c%c\n", + dbglog(DBG_ERROR, "vmufs_setup: can't alloc %d bytes for dir on device %c%c\n", *dirsize, dev->port+'A', dev->unit+'0'); goto dead; } @@ -525,7 +525,7 @@ *fatsize = vmufs_fat_blocks(root); *fat = (uint16 *)malloc(*fatsize); if (!*fat) { - dbglog(DBG_ERROR, "vmufs_readdir: can't alloc %d bytes for FAT on device %c%c\n", + dbglog(DBG_ERROR, "vmufs_setup: can't alloc %d bytes for FAT on device %c%c\n", *fatsize, dev->port+'A', dev->unit+'0'); goto dead; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-05-02 16:07:08
|
Revision: 573 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=573&view=rev Author: fackue Date: 2008-05-02 09:06:18 -0700 (Fri, 02 May 2008) Log Message: ----------- Newlib 1.15 not quite stable yet Modified Paths: -------------- kos/utils/dc-chain/Makefile kos/utils/dc-chain/download.sh kos/utils/dc-chain/unpack.sh Modified: kos/utils/dc-chain/Makefile =================================================================== --- kos/utils/dc-chain/Makefile 2008-04-30 23:42:31 UTC (rev 572) +++ kos/utils/dc-chain/Makefile 2008-05-02 16:06:18 UTC (rev 573) @@ -30,7 +30,7 @@ kos_base=$(kos_root)/kos binutils_ver=2.17 gcc_ver=3.4.6 -newlib_ver=1.15.0 +newlib_ver=1.12.0 gdb_ver=6.7.1 insight_ver=6.7.1 thread_model=posix Modified: kos/utils/dc-chain/download.sh =================================================================== --- kos/utils/dc-chain/download.sh 2008-04-30 23:42:31 UTC (rev 572) +++ kos/utils/dc-chain/download.sh 2008-05-02 16:06:18 UTC (rev 573) @@ -1,5 +1,5 @@ #!/bin/sh wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 || exit 1 wget -c ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 || exit 1 -wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz || exit 1 +wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.12.0.tar.gz || exit 1 Modified: kos/utils/dc-chain/unpack.sh =================================================================== --- kos/utils/dc-chain/unpack.sh 2008-04-30 23:42:31 UTC (rev 572) +++ kos/utils/dc-chain/unpack.sh 2008-05-02 16:06:18 UTC (rev 573) @@ -4,4 +4,4 @@ tar jxf binutils-2.17.tar.bz2 || exit 1 tar jxf gcc-3.4.6.tar.bz2 || exit 1 -tar zxf newlib-1.15.0.tar.gz || exit 1 +tar zxf newlib-1.12.0.tar.gz || exit 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-04-30 23:42:38
|
Revision: 572 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=572&view=rev Author: ljsebald Date: 2008-04-30 16:42:31 -0700 (Wed, 30 Apr 2008) Log Message: ----------- Adding implementations of read, write, and seek on sockets. Modified Paths: -------------- kos/kernel/fs/fs_socket.c Modified: kos/kernel/fs/fs_socket.c =================================================================== --- kos/kernel/fs/fs_socket.c 2008-04-30 19:24:31 UTC (rev 571) +++ kos/kernel/fs/fs_socket.c 2008-04-30 23:42:31 UTC (rev 572) @@ -41,11 +41,28 @@ free(sock); } +static ssize_t fs_socket_read(void *hnd, void *buffer, size_t cnt) { + net_socket_t *sock = (net_socket_t *)hnd; + + return net_udp_recv(sock, buffer, cnt, 0); +} + +static off_t fs_socket_seek(void *hnd, off_t offset, int whence) { + errno = ESPIPE; + return (off_t) -1; +} + static off_t fs_socket_tell(void *hnd) { errno = ESPIPE; return (off_t) -1; } +static ssize_t fs_socket_write(void *hnd, const void *buffer, size_t cnt) { + net_socket_t *sock = (net_socket_t *)hnd; + + return net_udp_send(sock, buffer, cnt, 0); +} + /* VFS handler */ static vfs_handler_t vh = { /* Name handler */ @@ -62,9 +79,9 @@ NULL, /* open */ fs_socket_close, /* close */ - NULL, /* read */ - NULL, /* write */ - NULL, /* seek */ + fs_socket_read, /* read */ + fs_socket_write, /* write */ + fs_socket_seek, /* seek */ fs_socket_tell, /* tell */ NULL, /* total */ NULL, /* readdir */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-04-30 19:24:49
|
Revision: 571 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=571&view=rev Author: fackue Date: 2008-04-30 12:24:31 -0700 (Wed, 30 Apr 2008) Log Message: ----------- (SDL) Fixed the incorrect mouse buttons being returned. Modified Paths: -------------- kos-ports/SDL/base/src/video/dc/SDL_dcevents.c Modified: kos-ports/SDL/base/src/video/dc/SDL_dcevents.c =================================================================== --- kos-ports/SDL/base/src/video/dc/SDL_dcevents.c 2008-04-29 18:51:47 UTC (rev 570) +++ kos-ports/SDL/base/src/video/dc/SDL_dcevents.c 2008-04-30 19:24:31 UTC (rev 571) @@ -51,12 +51,12 @@ 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', /*1e*/ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - /*28*/ SDLK_RETURN, SDLK_ESCAPE, SDLK_BACKSPACE, SDLK_TAB, SDLK_SPACE, SDLK_MINUS, SDLK_PLUS, SDLK_LEFTBRACKET, + /*28*/ SDLK_RETURN, SDLK_ESCAPE, SDLK_BACKSPACE, SDLK_TAB, SDLK_SPACE, SDLK_MINUS, SDLK_PLUS, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET, SDLK_BACKSLASH , 0, SDLK_SEMICOLON, SDLK_QUOTE, - /*35*/ '~', SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_CAPSLOCK, + /*35*/ '~', SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_CAPSLOCK, SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8, SDLK_F9, SDLK_F10, SDLK_F11, SDLK_F12, /*46*/ SDLK_PRINT, SDLK_SCROLLOCK, SDLK_PAUSE, SDLK_INSERT, SDLK_HOME, SDLK_PAGEUP, SDLK_DELETE, SDLK_END, SDLK_PAGEDOWN, SDLK_RIGHT, SDLK_LEFT, SDLK_DOWN, SDLK_UP, - /*53*/ SDLK_NUMLOCK, SDLK_KP_DIVIDE, SDLK_KP_MULTIPLY, SDLK_KP_MINUS, SDLK_KP_PLUS, SDLK_KP_ENTER, + /*53*/ SDLK_NUMLOCK, SDLK_KP_DIVIDE, SDLK_KP_MULTIPLY, SDLK_KP_MINUS, SDLK_KP_PLUS, SDLK_KP_ENTER, SDLK_KP1, SDLK_KP2, SDLK_KP3, SDLK_KP4, SDLK_KP5, SDLK_KP6, /*5f*/ SDLK_KP7, SDLK_KP8, SDLK_KP9, SDLK_KP0, SDLK_KP_PERIOD, 0 /* S3 */ }; @@ -72,10 +72,10 @@ static void mouse_update(void) { const static char sdl_mousebtn[] = { + MOUSE_WHEELUP, MOUSE_LEFTBUTTON, + MOUSE_SIDEBUTTON, MOUSE_RIGHTBUTTON, - MOUSE_SIDEBUTTON, - MOUSE_WHEELUP, MOUSE_WHEELDOWN }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-04-29 18:51:52
|
Revision: 570 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=570&view=rev Author: ljsebald Date: 2008-04-29 11:51:47 -0700 (Tue, 29 Apr 2008) Log Message: ----------- Two things in this commit: - Some time, when I changed the UDP code, I managed to make recv/recvfrom not unlock the UDP mutex if they have to wait on a packet, that's fixed now. - fs_dclsocket has been added. fs_dclsocket is essentially dcload-ip over the internal UDP sockets code. I started on this a while ago (probably about a year ago now), and I just now got around to finally cleaning it up and committing it. Now, debugging network code that uses KOS' internal IP/UDP stuff should be much easier. Modified Paths: -------------- kos/kernel/arch/dreamcast/fs/Makefile kos/kernel/arch/dreamcast/kernel/init.c kos/kernel/arch/dreamcast/kernel/initall_hdrs.h kos/kernel/net/net_input.c kos/kernel/net/net_udp.c Added Paths: ----------- kos/kernel/arch/dreamcast/fs/fs_dclsocket.c kos/kernel/arch/dreamcast/include/dc/fs_dclsocket.h Modified: kos/kernel/arch/dreamcast/fs/Makefile =================================================================== --- kos/kernel/arch/dreamcast/fs/Makefile 2008-04-29 01:12:32 UTC (rev 569) +++ kos/kernel/arch/dreamcast/fs/Makefile 2008-04-29 18:51:47 UTC (rev 570) @@ -7,7 +7,8 @@ # Dreamcast-specific file systems -OBJS = fs_iso9660.o fs_vmu.o fs_dcload.o dcload-syscall.o vmufs.o +OBJS = fs_iso9660.o fs_vmu.o fs_dcload.o dcload-syscall.o vmufs.o \ + fs_dclsocket.o # OBJS += fs_dclnative.o dcload-commands.o dcload-net.o dcload-packet.o dcload-syscalls.o SUBDIRS = Added: kos/kernel/arch/dreamcast/fs/fs_dclsocket.c =================================================================== --- kos/kernel/arch/dreamcast/fs/fs_dclsocket.c (rev 0) +++ kos/kernel/arch/dreamcast/fs/fs_dclsocket.c 2008-04-29 18:51:47 UTC (rev 570) @@ -0,0 +1,817 @@ +/* KallistiOS ##version## + + kernel/arch/dreamcast/fs/fs_dclsocket.c + Copyright (C) 2007, 2008 Lawrence Sebald + + Based on fs_dclnative.c and related files + Copyright (C) 2003 Dan Potter + + Portions of various supporting modules are + Copyright (C) 2001 Andrew Kieschnick, imported + from the GPL'd dc-load-ip sources to a BSD-compatible + license with permission. + +*/ + +/* This file is basically a rewrite of the old fs_dclnative that uses KOS' + internal sockets library. This fs module is basically designed for debugging + networked code with dcload-ip, rather than requiring a serial cable and + dcload-serial. */ + +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> +#include <string.h> +#include <stdlib.h> +#include <unistd.h> +#include <errno.h> +#include <dirent.h> + +#include <kos/mutex.h> +#include <kos/fs.h> +#include <kos/net.h> +#include <kos/dbgio.h> +#include <kos/dbglog.h> + +#include <dc/fs_dclsocket.h> + +#define DCLOAD_PORT 31313 +#define NAME "dcload-ip over KOS sockets" + +#define PACKED __attribute__((packed)) +typedef struct { + unsigned char id[4] PACKED; + unsigned int address PACKED; + unsigned int size PACKED; + unsigned char data[0] PACKED; +} command_t; + +typedef struct { + unsigned char id[4] PACKED; + unsigned int value0 PACKED; +} command_int_t; + +typedef struct { + unsigned char id[4] PACKED; + unsigned int value0 PACKED; + unsigned int value1 PACKED; + unsigned int value2 PACKED; +} command_3int_t; +#undef PACKED + +static struct { + unsigned int addr; + unsigned int size; + unsigned char map[16384]; +} bin_info; + +extern int dcload_type; +static int initted = 0; +static int escape = 0; +static int retval = 0; +static mutex_t *mutex; +static char *dcload_path = NULL; +static uint8 pktbuf[1024 + sizeof(command_t)]; + +static int dcls_socket = -1; + +static void dcls_handle_lbin(command_t *cmd) { + bin_info.addr = ntohl(cmd->address); + bin_info.size = ntohl(cmd->size); + memset(bin_info.map, 0, 16384); + + send(dcls_socket, cmd, sizeof(command_t), 0); +} + +static void dcls_handle_pbin(command_t *cmd) { + int index = (ntohl(cmd->address) - bin_info.addr) >> 10; + + memcpy((uint8 *)ntohl(cmd->address), cmd->data, ntohl(cmd->size)); + bin_info.map[index] = 1; +} + +static void dcls_handle_dbin(command_t *cmd) { + int i; + + for(i = 0; i < (bin_info.size + 1023) / 1024; ++i) { + if(!bin_info.map[i]) + break; + } + + if(i == (bin_info.size + 1023) / 1024) { + cmd->address = 0; + cmd->size = 0; + } + else { + cmd->address = htonl(bin_info.addr + i * 1024); + if(i == (bin_info.size + 1023) / 1024 - 1) { + cmd->size = htonl(bin_info.size % 1024); + } + else { + cmd->size = htonl(1024); + } + } + + send(dcls_socket, cmd, sizeof(command_t), 0); +} + +static void dcls_handle_sbin(command_t *cmd) { + uint32 left, size; + uint8 *ptr; + int count, i; + command_t *resp = (command_t *)pktbuf; + + left = ntohl(cmd->size); + ptr = (uint8 *)ntohl(cmd->address); + count = left + 1023 / 1024; + + memcpy(resp->id, "SBIN", 4); + + for(i = 0; i < count; ++i) { + size = left > 1024 ? 1024 : left; + left -= size; + + resp->address = htonl((uint32)ptr); + resp->size = htonl(size); + memcpy(resp->data, ptr, size); + + send(dcls_socket, resp, sizeof(command_t) + size, 0); + ptr += size; + } + + memcpy(resp->id, "DBIN", 4); + + resp->address = 0; + resp->size = 0; + send(dcls_socket, resp, sizeof(command_t), 0); +} + +static void dcls_handle_retv(command_t *cmd) { + send(dcls_socket, cmd, sizeof(command_t), 0); + retval = ntohl(cmd->address); + escape = 1; +} + +static void dcls_handle_vers(command_t *cmd) { + command_t *resp = (command_t *)pktbuf; + int size = strlen(NAME) + 1 + sizeof(command_t); + + memcpy(resp, cmd, sizeof(command_t)); + strcpy(resp->data, NAME); + + send(dcls_socket, pktbuf, size, 0); +} + +static void dcls_recv_loop() { + uint8 pkt[1514]; + command_t *cmd = (command_t *)pkt; + + while(!escape) { + /* If we're in an interrupt, this works differently.... */ + if(irq_inside_int()) { + /* Since we can't count on an interrupt happening, handle it + manually, and poll the default device... */ + net_default_dev->if_rx_poll(net_default_dev); + + if(recv(dcls_socket, pkt, 1514, 0) == -1) + continue; + } + else if(recv(dcls_socket, pkt, 1514, 0) == -1) { + break; + } + + if(!memcmp(cmd->id, "RETV", 4)) { + dcls_handle_retv(cmd); + } + else if(!memcmp(cmd->id, "SBIN", 4) || !memcmp(cmd->id, "SBIQ", 4)) { + dcls_handle_sbin(cmd); + } + else if(!memcmp(cmd->id, "LBIN", 4)) { + dcls_handle_lbin(cmd); + } + else if(!memcmp(cmd->id, "PBIN", 4)) { + dcls_handle_pbin(cmd); + } + else if(!memcmp(cmd->id, "DBIN", 4)) { + dcls_handle_dbin(cmd); + } + else if(!memcmp(cmd->id, "VERS", 4)) { + dcls_handle_vers(cmd); + } + } + + escape = 0; +} + +static void *dcls_open(struct vfs_handler *vfs, const char *fn, int mode) { + int hnd, locked; + int dcload_mode = 0; + command_t *cmd = (command_t *)pktbuf; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return 0; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + if(mode & O_DIR) { + char realfn[fn[0] ? strlen(fn) + 1 : 2]; + + if(fn[0] == '\0') { + strcpy(realfn, "/"); + } + else { + strcpy(realfn, fn); + } + + memcpy(pktbuf, "DC16", 4); + strcpy(pktbuf + 4, fn); + + send(dcls_socket, pktbuf, 5 + strlen(realfn), 0); + + dcls_recv_loop(); + hnd = retval; + + if(hnd) { + if(dcload_path) + free(dcload_path); + + if(fn[strlen(realfn) - 1] == '/') { + dcload_path = (char *)malloc(strlen(realfn) + 1); + strcpy(dcload_path, realfn); + } + else { + dcload_path = (char *)malloc(strlen(realfn) + 2); + strcpy(dcload_path, realfn); + strcat(dcload_path, "/"); + } + } + } + else { + if((mode & O_MODE_MASK) == O_RDONLY) + dcload_mode = 0; + else if((mode & O_MODE_MASK) == O_RDWR) + dcload_mode = 0x0202; + else if((mode & O_MODE_MASK) == O_WRONLY) + dcload_mode = 0x0201; + else if((mode & O_MODE_MASK) == O_APPEND) + dcload_mode = 0x020A; + + if(mode & O_TRUNC) + dcload_mode |= 0x0400; + + memcpy(cmd->id, "DC04", 4); + cmd->address = htonl(dcload_mode); /* Open flags */ + cmd->size = htonl(0644); /* umask */ + strcpy(cmd->data, fn); + + send(dcls_socket, pktbuf, sizeof(command_t) + strlen(fn) + 1, 0); + dcls_recv_loop(); + hnd = retval + 1; + } + + mutex_unlock(mutex); + + return (void *)hnd; +} + +static void dcls_close(void *hnd) { + int fd = (int) hnd, locked; + command_int_t *cmd = (command_int_t *)pktbuf; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + if(fd > 100) { + memcpy(cmd->id, "DC17", 4); + cmd->value0 = htonl(fd); + + send(dcls_socket, cmd, sizeof(command_int_t), 0); + dcls_recv_loop(); + } + else if(fd) { + --fd; + + memcpy(cmd->id, "DC05", 4); + cmd->value0 = htonl(fd); + + send(dcls_socket, cmd, sizeof(command_int_t), 0); + dcls_recv_loop(); + } + + mutex_unlock(mutex); +} + +static ssize_t dcls_read(void *hnd, void *buf, size_t cnt) { + uint32 fd = (uint32) hnd; + int locked; + command_3int_t *cmd = (command_3int_t *)pktbuf; + + if(!fd) + return -1; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + --fd; + + memcpy(cmd->id, "DC03", 4); + cmd->value0 = htonl(fd); + cmd->value1 = htonl((uint32) buf); + cmd->value2 = htonl((uint32) cnt); + + send(dcls_socket, cmd, sizeof(command_3int_t), 0); + dcls_recv_loop(); + + mutex_unlock(mutex); + + return retval; +} + +static ssize_t dcls_write(void *hnd, const void *buf, size_t cnt) { + uint32 fd = (uint32) hnd; + int locked; + command_3int_t *cmd = (command_3int_t *)pktbuf; + + if(!fd) + return -1; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + --fd; + + memcpy(cmd->id, "DD02", 4); + cmd->value0 = htonl(fd); + cmd->value1 = htonl((uint32) buf); + cmd->value2 = htonl(cnt); + + send(dcls_socket, cmd, sizeof(command_3int_t), 0); + dcls_recv_loop(); + + mutex_unlock(mutex); + + return retval; +} + +static off_t dcls_seek(void *hnd, off_t offset, int whence) { + int locked; + command_3int_t *command = (command_3int_t *)pktbuf; + + if(!hnd) + return -1; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + --hnd; + + memcpy(command->id, "DC11", 4); + command->value0 = htonl((uint32)hnd); + command->value1 = htonl((uint32)offset); + command->value2 = htonl((uint32)whence); + + send(dcls_socket, command, sizeof(command_3int_t), 0); + dcls_recv_loop(); + + mutex_unlock(mutex); + + return retval; +} + +static off_t dcls_tell(void *hnd) { + return dcls_seek(hnd, 0, SEEK_CUR); +} + +static size_t dcls_total(void *hnd) { + size_t cur, ret; + + cur = dcls_tell(hnd); + ret = dcls_seek(hnd, 0, SEEK_END); + dcls_seek(hnd, cur, SEEK_SET); + + return ret; +} + +static dirent_t their_dir; +static dcload_dirent_t our_dir; + +static dirent_t *dcls_readdir(void *hnd) { + int locked; + uint32 fd = (uint32) hnd; + command_3int_t *cmd = (command_3int_t *)pktbuf; + + if(fd < 100) + return NULL; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return NULL; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + memcpy(cmd->id, "DC18", 4); + cmd->value0 = htonl(fd); + cmd->value1 = htonl((uint32) (&our_dir)); + cmd->value2 = htonl(sizeof(dcload_dirent_t)); + + send(dcls_socket, cmd, sizeof(command_3int_t), 0); + + dcls_recv_loop(); + + if(retval) { + char fn[strlen(dcload_path) + strlen(our_dir.d_name) + 1]; + command_t *cmd2 = (command_t *)pktbuf; + dcload_stat_t filestat; + + strcpy(their_dir.name, our_dir.d_name); + their_dir.size = 0; + their_dir.time = 0; + their_dir.attr = 0; + + strcpy(fn, dcload_path); + strcat(fn, our_dir.d_name); + + memcpy(cmd2->id, "DC13", 4); + cmd2->address = htonl((uint32) &filestat); + cmd2->size = htonl(sizeof(dcload_stat_t)); + strcpy(cmd2->data, fn); + + send(dcls_socket, cmd2, sizeof(command_t) + strlen(fn) + 1, 0); + + dcls_recv_loop(); + + if(!retval) { + if(filestat.st_mode & S_IFDIR) { + their_dir.size = -1; + } + else { + their_dir.size = filestat.st_size; + } + + their_dir.time = filestat.st_mtime; + } + + mutex_unlock(mutex); + return &their_dir; + } + + mutex_unlock(mutex); + return NULL; +} + +static int dcls_rename(vfs_handler_t *vfs, const char *fn1, const char *fn2) { + int len1 = strlen(fn1), len2 = strlen(fn2), locked; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + memcpy(pktbuf, "DC07", 4); + strcpy(pktbuf + 4, fn1); + strcpy(pktbuf + 5 + len1, fn2); + + send(dcls_socket, pktbuf, 6 + len1 + len2, 0); + + dcls_recv_loop(); + + if(retval == 0) { + memcpy(pktbuf, "DC08", 4); + strcpy(pktbuf + 4, fn1); + + send(dcls_socket, pktbuf, len1 + 5, 0); + + dcls_recv_loop(); + } + + mutex_unlock(mutex); + + return retval; +} + +static int dcls_unlink(vfs_handler_t *vfs, const char *fn) { + int len = strlen(fn) + 5, locked; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + memcpy(pktbuf, "DC08", 4); + strcpy(pktbuf + 4, fn); + + send(dcls_socket, pktbuf, len, 0); + + dcls_recv_loop(); + + mutex_unlock(mutex); + + return retval; +} + +static int dcls_stat(vfs_handler_t *vfs, const char *fn, stat_t *rv) { + command_t *cmd = (command_t *)pktbuf; + dcload_stat_t filestat; + int locked; + + if(!rv) { + return -1; + } + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + memcpy(cmd->id, "DC13", 4); + cmd->address = htonl((uint32) &filestat); + cmd->size = htonl(sizeof(struct stat)); + strcpy(cmd->data, fn); + + send(dcls_socket, cmd, sizeof(command_t) + strlen(fn) + 1, 0); + + dcls_recv_loop(); + + if(!retval) { + rv->dev = vfs; + rv->unique = filestat.st_ino; + + if(filestat.st_mode & S_IFDIR) { + rv->type = STAT_TYPE_DIR; + rv->size = -1; + } + else { + rv->type = STAT_TYPE_FILE; + rv->size = filestat.st_size; + } + + rv->time = filestat.st_mtime; + + mutex_unlock(mutex); + return 0; + } + + mutex_unlock(mutex); + return -1; +} + +/* dbgio interface */ +static int dcls_detected() { + return initted > 0; +} + +static int dcls_fake_init() { + return 0; +} + +static int dcls_fake_shutdown() { + return 0; +} + +static int dcls_writebuf(const uint8 *buf, int len, int xlat) { + int locked; + command_3int_t cmd; + + if(initted < 2) + return -1; + + locked = mutex_trylock(mutex); + + if(locked == -1 && irq_inside_int()) { + errno = EAGAIN; + return -1; + } + else if(locked == -1) { + mutex_lock(mutex); + } + + memcpy(cmd.id, "DD02", 4); + cmd.value0 = htonl(1); + cmd.value1 = htonl((uint32) buf); + cmd.value2 = htonl(len); + + send(dcls_socket, &cmd, sizeof(cmd), 0); + + dcls_recv_loop(); + + mutex_unlock(mutex); + + return retval; +} + +/* VFS handler */ +static vfs_handler_t vh = { + /* Name handler */ + { + "/pc", /* name */ + 0, /* tbfi */ + 0x00010000, /* Version 1.0 */ + 0, /* flags */ + NMMGR_TYPE_VFS, + NMMGR_LIST_INIT + }, + + 0, NULL, /* no cache, privdata */ + + dcls_open, + dcls_close, + dcls_read, + dcls_write, + dcls_seek, + dcls_tell, + dcls_total, + dcls_readdir, + NULL, /* ioctl */ + dcls_rename, + dcls_unlink, + NULL, /* mmap */ + NULL, /* complete */ + dcls_stat, + NULL, /* mkdir */ + NULL /* rmdir */ +}; + +/* dbgio handler */ +dbgio_handler_t dbgio_dcls = { + "fs_dclsocket", + dcls_detected, + dcls_fake_init, + dcls_fake_shutdown, + NULL, + NULL, + NULL, + NULL, + dcls_writebuf, + NULL +}; + +/* This function must be called prior to calling fs_dclsocket_init() */ +void fs_dclsocket_init_console() { + /* Make sure networking is up first of all */ + if(!net_default_dev) { + return; + } + + dbgio_dcls.set_irq_usage = dbgio_null.set_irq_usage; + dbgio_dcls.read = dbgio_null.read; + dbgio_dcls.write = dbgio_null.write; + dbgio_dcls.flush = dbgio_null.flush; + dbgio_dcls.read_buffer = dbgio_null.read_buffer; + + initted = 1; +} + +int fs_dclsocket_init() { + struct sockaddr_in addr; + int err; + uint8 ipaddr[4], mac[6]; + uint32 ip, port; + + /* Make sure we've initted the console */ + if(initted != 1) + return -1; + + /* Make sure we're actually on dcload-ip */ + if(dcload_type != DCLOAD_TYPE_IP) + return -1; + + /* Determine where dctool is running, and set up our variables for that */ + dcloadsyscall(DCLOAD_GETHOSTINFO, &ip, &port); + + /* Put dc-tool's info into our ARP cache */ + net_ipv4_parse_address(ip, ipaddr); + + err = net_arp_lookup(net_default_dev, ipaddr, mac); + while(err == -1 || err == -2) { + err = net_arp_lookup(net_default_dev, ipaddr, mac); + } + + /* Make the entry permanent */ + net_arp_insert(net_default_dev, mac, ipaddr, 0); + + /* Ok, now create our socket, and set it up properly */ + dcls_socket = socket(PF_INET, SOCK_DGRAM, 0); + + if(dcls_socket == -1) + return -1; + + addr.sin_family = AF_INET; + addr.sin_port = htons(DCLOAD_PORT); + addr.sin_addr.s_addr = INADDR_ANY; + memset(addr.sin_zero, 0, 8); + + err = bind(dcls_socket, (struct sockaddr *)&addr, sizeof(struct sockaddr)); + + if(err == -1) + goto error; + + addr.sin_port = htons((uint16)port); + addr.sin_addr.s_addr = htonl(ip); + + err = connect(dcls_socket, (struct sockaddr *)&addr, + sizeof(struct sockaddr)); + + if(err == -1) + goto error; + + mutex = mutex_create(); + + if(!mutex) + goto error; + + initted = 2; + + return nmmgr_handler_add(&vh.nmmgr); + +error: + close(dcls_socket); + return -1; +} + +int fs_dclsocket_shutdown() { + int old; + command_t cmd; + + if(initted != 2) + return -1; + + dbglog(DBG_INFO, "fs_dclsocket: About to disable console\n"); + + /* Send dc-tool an exit packet */ + memcpy(cmd.id, "DC00", 4); + + cmd.address = 0; + cmd.size = 0; + + send(dcls_socket, &cmd, sizeof(command_t), 0); + + old = irq_disable(); + + /* Disable the console first of all */ + if(strcmp(dbgio_dev_get(), "fs_dclsocket")) + dbgio_dev_select("null"); + + /* Destroy our mutex, and set us as uninitted */ + mutex_destroy(mutex); + initted = 0; + + irq_enable(old); + + /* Finally, clean up the socket */ + close(dcls_socket); + + return nmmgr_handler_remove(&vh.nmmgr); +} Added: kos/kernel/arch/dreamcast/include/dc/fs_dclsocket.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/fs_dclsocket.h (rev 0) +++ kos/kernel/arch/dreamcast/include/dc/fs_dclsocket.h 2008-04-29 18:51:47 UTC (rev 570) @@ -0,0 +1,26 @@ +/* KallistiOS ##version## + + dc/fs_dclsocket.h + Copyright (C) 2007, 2008 Lawrence Sebald + +*/ + +#ifndef __DC_FSDCLSOCKET_H +#define __DC_FSDCLSOCKET_H + +#include <sys/cdefs.h> +__BEGIN_DECLS + +#include <dc/fs_dcload.h> + +extern dbgio_handler_t dbgio_dcls; + +/* Initialization */ +void fs_dclsocket_init_console(); +int fs_dclsocket_init(); + +int fs_dclsocket_shutdown(); + +__END_DECLS + +#endif /* __DC_FSDCLSOCKET_H */ Modified: kos/kernel/arch/dreamcast/kernel/init.c =================================================================== --- kos/kernel/arch/dreamcast/kernel/init.c 2008-04-29 01:12:32 UTC (rev 569) +++ kos/kernel/arch/dreamcast/kernel/init.c 2008-04-29 18:51:47 UTC (rev 570) @@ -34,6 +34,7 @@ /* We have to put this here so we can include plat-specific devices */ dbgio_handler_t * dbgio_handlers[] = { &dbgio_dcload, + &dbgio_dcls, &dbgio_scif, &dbgio_null }; @@ -116,7 +117,21 @@ old = dbgio_set_printk(dbgio_write_str); } */ if (__kos_init_flags & INIT_NET) { + /* Check if the dcload-ip console is up, and if so, disable it, + otherwise we'll crash when we attempt to bring up the BBA */ + if(!(__kos_init_flags & INIT_NO_DCLOAD) && dcload_type == DCLOAD_TYPE_IP) { + dbgio_dev_select("scif"); + } + net_init(); /* Enable networking (and drivers) */ + + if(!(__kos_init_flags & INIT_NO_DCLOAD) && dcload_type == DCLOAD_TYPE_IP) { + fs_dclsocket_init_console(); + if(!fs_dclsocket_init()) { + dbgio_dev_select("fs_dclsocket"); + dbglog(DBG_INFO, "fs_dclsocket console support enabled\n"); + } + } } /* if (!(__kos_init_flags & INIT_NO_DCLOAD) && *DCLOADMAGICADDR == DCLOADMAGICVALUE && (__kos_init_flags & INIT_NET)) @@ -131,13 +146,13 @@ } void arch_auto_shutdown() { + fs_dclsocket_shutdown(); + net_shutdown(); + irq_disable(); snd_shutdown(); timer_shutdown(); hardware_shutdown(); - if (__kos_init_flags & INIT_NET) { - net_shutdown(); - } pvr_shutdown(); library_shutdown(); fs_dcload_shutdown(); Modified: kos/kernel/arch/dreamcast/kernel/initall_hdrs.h =================================================================== --- kos/kernel/arch/dreamcast/kernel/initall_hdrs.h 2008-04-29 01:12:32 UTC (rev 569) +++ kos/kernel/arch/dreamcast/kernel/initall_hdrs.h 2008-04-29 18:51:47 UTC (rev 570) @@ -11,7 +11,7 @@ #include <dc/fs_iso9660.h> #include <dc/fs_vmu.h> #include <dc/fs_dcload.h> -#include <dc/fs_dclnative.h> +#include <dc/fs_dclsocket.h> #include <dc/spu.h> #include <dc/pvr.h> #include <dc/maple.h> Modified: kos/kernel/net/net_input.c =================================================================== --- kos/kernel/net/net_input.c 2008-04-29 01:12:32 UTC (rev 569) +++ kos/kernel/net/net_input.c 2008-04-29 18:51:47 UTC (rev 570) @@ -29,8 +29,6 @@ return net_arp_input(nif, data, len); default: - dbglog(DBG_KDEBUG, "net_input: unhandled ethernet " - "protocol: %x\n", proto); return 0; } } Modified: kos/kernel/net/net_udp.c =================================================================== --- kos/kernel/net/net_udp.c 2008-04-29 01:12:32 UTC (rev 569) +++ kos/kernel/net/net_udp.c 2008-04-29 18:51:47 UTC (rev 570) @@ -231,7 +231,9 @@ } if(TAILQ_EMPTY(&udpsock->packets)) { + mutex_unlock(udp_mutex); genwait_wait(udpsock, "net_udp_recv", 0, NULL); + mutex_lock(udp_mutex); } pkt = TAILQ_FIRST(&udpsock->packets); @@ -295,7 +297,9 @@ } while(TAILQ_EMPTY(&udpsock->packets)) { + mutex_unlock(udp_mutex); genwait_wait(udpsock, "net_udp_recvfrom", 0, NULL); + mutex_lock(udp_mutex); } pkt = TAILQ_FIRST(&udpsock->packets); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-04-29 01:12:50
|
Revision: 569 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=569&view=rev Author: ljsebald Date: 2008-04-28 18:12:32 -0700 (Mon, 28 Apr 2008) Log Message: ----------- Changing the behavior when a send is attempted to a host that does not have a cached ARP entry. Now, net_arp_lookup will return -2, signaling that an ARP query has been sent out. net_ipv4_send_packet detects this condition and returns this to the caller (net_udp_send_raw at this point). net_udp_send_raw sees this condition returned from net_ipv4_send_packet, and retries the transmission after 100ms. Thus, the first send to hosts won't fail in UDP any more, unless the host does not respond to the ARP query (i.e. its not actually there). Modified Paths: -------------- kos/kernel/net/net_arp.c kos/kernel/net/net_ipv4.c kos/kernel/net/net_udp.c kos/kernel/net/net_udp.h Modified: kos/kernel/net/net_arp.c =================================================================== --- kos/kernel/net/net_arp.c 2008-04-29 00:48:20 UTC (rev 568) +++ kos/kernel/net/net_arp.c 2008-04-29 01:12:32 UTC (rev 569) @@ -122,7 +122,7 @@ net_arp_query(nif, ip_in); /* Return failure */ - return -1; + return -2; } /* Do a reverse ARP lookup: look for an IP for a given mac address; note Modified: kos/kernel/net/net_ipv4.c =================================================================== --- kos/kernel/net/net_ipv4.c 2008-04-29 00:48:20 UTC (rev 568) +++ kos/kernel/net/net_ipv4.c 2008-04-29 01:12:32 UTC (rev 569) @@ -80,6 +80,7 @@ uint8 dest_mac[6]; uint8 pkt[size + sizeof(ip_hdr_t) + sizeof(eth_hdr_t)]; eth_hdr_t *ehdr; + int err; if(net == NULL) { net = net_default_dev; @@ -104,11 +105,17 @@ memcpy(dest_ip, net->gateway, 4); } - /* Get our destination's MAC address */ - if(net_arp_lookup(net, dest_ip, dest_mac) == -1) { + /* Get our destination's MAC address. If we do not have the MAC address + cached, return a distinguished error to the upper-level protocol so + that it can decide what to do. */ + err = net_arp_lookup(net, dest_ip, dest_mac); + if(err == -1) { errno = ENETUNREACH; return -1; } + else if(err == -2) { + return -2; + } /* Fill in the ethernet header */ ehdr = (eth_hdr_t *)pkt; Modified: kos/kernel/net/net_udp.c =================================================================== --- kos/kernel/net/net_udp.c 2008-04-29 00:48:20 UTC (rev 568) +++ kos/kernel/net/net_udp.c 2008-04-29 01:12:32 UTC (rev 569) @@ -399,7 +399,7 @@ udpsock->local_addr.sin_port, udpsock->remote_addr.sin_addr.s_addr, udpsock->remote_addr.sin_port, (uint8 *) message, - length); + length, udpsock->flags); } ssize_t net_udp_sendto(net_socket_t *hnd, const void *message, size_t length, @@ -463,7 +463,7 @@ return net_udp_send_raw(NULL, udpsock->local_addr.sin_addr.s_addr, udpsock->local_addr.sin_port, realaddr->sin_addr.s_addr, realaddr->sin_port, - (uint8 *) message, length); + (uint8 *) message, length, udpsock->flags); } int net_udp_shutdownsock(net_socket_t *hnd, int how) { @@ -671,9 +671,10 @@ int net_udp_send_raw(netif_t *net, uint32 src_ip, uint16 src_port, uint32 dst_ip, uint16 dst_port, const uint8 *data, - int size) { + int size, int flags) { uint8 buf[size + 12 + sizeof(udp_hdr_t)]; ip_pseudo_hdr_t *ps = (ip_pseudo_hdr_t *) buf; + int err; if(net == NULL && net_default_dev == NULL) { errno = ENETDOWN; @@ -705,12 +706,25 @@ ps->checksum = 0; ps->checksum = net_ipv4_checksum(buf, size + 12); +retry_send: /* Pass everything off to the network layer to do the rest. */ - if(net_ipv4_send(net, buf + 12, size, 0, 64, IPPROTO_UDP, ps->src_addr, - ps->dst_addr)) { - /* If the packet send fails, errno will be set already. */ + err = net_ipv4_send(net, buf + 12, size, 0, 64, IPPROTO_UDP, ps->src_addr, + ps->dst_addr); + + /* If the IP layer returns that the ARP cache didn't have the entry for the + destination, sleep for a little bit, and try again (as long as the + non-blocking flag was not set). */ + if(err == -2 && !(flags & O_NONBLOCK)) { + thd_sleep(100); + goto retry_send; + } + else if(err == -2) { + errno = ENETUNREACH; return -1; } + else if(err < 0) { + return -1; + } else { return size - sizeof(udp_hdr_t); } Modified: kos/kernel/net/net_udp.h =================================================================== --- kos/kernel/net/net_udp.h 2008-04-29 00:48:20 UTC (rev 568) +++ kos/kernel/net/net_udp.h 2008-04-29 01:12:32 UTC (rev 569) @@ -1,7 +1,7 @@ /* KallistiOS ##version## kernel/net/net_udp.h - Copyright (C) 2005, 2006, 2007 Lawrence Sebald + Copyright (C) 2005, 2006, 2007, 2008 Lawrence Sebald */ @@ -23,7 +23,7 @@ int net_udp_input(netif_t *src, ip_hdr_t *ih, const uint8 *data, int size); int net_udp_send_raw(netif_t *net, uint32 src_ip, uint16 src_port, uint32 dst_ip, uint16 dst_port, const uint8 *data, - int size); + int size, int flags); /* Sockets */ int net_udp_accept(net_socket_t *hnd, struct sockaddr *addr, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2008-04-29 00:48:23
|
Revision: 568 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=568&view=rev Author: ljsebald Date: 2008-04-28 17:48:20 -0700 (Mon, 28 Apr 2008) Log Message: ----------- A slight modification to net_default_input, as well as a more sane way to handle loopback sends in net_ipv4 (sending it directly back into net_ipv4_input). Modified Paths: -------------- kos/kernel/net/net_input.c kos/kernel/net/net_ipv4.c Modified: kos/kernel/net/net_input.c =================================================================== --- kos/kernel/net/net_input.c 2008-04-26 20:58:15 UTC (rev 567) +++ kos/kernel/net/net_input.c 2008-04-29 00:48:20 UTC (rev 568) @@ -7,7 +7,6 @@ #include <stdio.h> #include <kos/net.h> -#include <arpa/inet.h> #include "net_ipv4.h" CVSID("$Id: net_input.c,v 1.2 2002/03/24 00:27:05 bardtx Exp $"); @@ -19,17 +18,19 @@ */ static int net_default_input(netif_t *nif, const uint8 *data, int len) { - uint16 *proto = (uint16 *)(data + 12); + uint16 proto = (uint16)((data[12] << 8) | (data[13])); - switch(ntohs(*proto)) { + switch(proto) { case 0x0800: return net_ipv4_input(nif, data + sizeof(eth_hdr_t), len - sizeof(eth_hdr_t)); + case 0x0806: return net_arp_input(nif, data, len); + default: dbglog(DBG_KDEBUG, "net_input: unhandled ethernet " - "protocol: %x\n", ntohs(*proto)); + "protocol: %x\n", proto); return 0; } } Modified: kos/kernel/net/net_ipv4.c =================================================================== --- kos/kernel/net/net_ipv4.c 2008-04-26 20:58:15 UTC (rev 567) +++ kos/kernel/net/net_ipv4.c 2008-04-29 00:48:20 UTC (rev 568) @@ -73,7 +73,7 @@ return 1; } -/* Send a packet on the specified network adaptor */ +/* Send a packet on the specified network adapter */ int net_ipv4_send_packet(netif_t *net, ip_hdr_t *hdr, const uint8 *data, int size) { uint8 dest_ip[4]; @@ -89,26 +89,12 @@ /* Is this the loopback address (127.0.0.1)? */ if(ntohl(hdr->dest) == 0x7F000001) { - /* Fill in the ethernet header */ - ehdr = (eth_hdr_t *)pkt; - memset(ehdr->dest, 0, 6); - memset(ehdr->src, 0, 6); - - ehdr->dest[0] = 0xCF; - ehdr->src[0] = 0xCF; - - ehdr->type[0] = 0x08; - ehdr->type[1] = 0x00; - - /* Put the IP header / data into our ethernet packet */ - memcpy(pkt + sizeof(eth_hdr_t), hdr, - 4 * (hdr->version_ihl & 0x0f)); - memcpy(pkt + sizeof(eth_hdr_t) + 4 * (hdr->version_ihl & 0x0f), - data, size); + /* Put the IP header / data into our packet */ + memcpy(pkt, hdr, 4 * (hdr->version_ihl & 0x0f)); + memcpy(pkt + 4 * (hdr->version_ihl & 0x0f), data, size); - /* Send it away */ - net_input(NULL, pkt, sizeof(eth_hdr_t) + sizeof(ip_hdr_t) + - size); + /* Send it "away" */ + net_ipv4_input(NULL, pkt, 4 * (hdr->version_ihl & 0x0f) + size); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2008-04-14 22:00:33
|
Revision: 566 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=566&view=rev Author: atani Date: 2008-04-14 15:00:28 -0700 (Mon, 14 Apr 2008) Log Message: ----------- fix LOCK_RECURSIVE Modified Paths: -------------- kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff Modified: kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff =================================================================== --- kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff 2008-04-14 16:10:23 UTC (rev 565) +++ kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff 2008-04-14 22:00:28 UTC (rev 566) @@ -119,7 +119,7 @@ +typedef struct { int a, b, c; } _LOCK_RECURSIVE_T; + +#define __LOCK_INIT(class,lock) class _LOCK_T lock = 0; -+#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_T lock = { 0, 0, 0 }; ++#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_RECURSIVE_T lock = { 0, 0, 0 }; +#define __lock_init(lock) __newlib_lock_init(&(lock)) +#define __lock_init_recursive(lock) __newlib_lock_init_recursive(&(lock)) +#define __lock_close(lock) __newlib_lock_close(&(lock)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2008-04-14 16:10:33
|
Revision: 565 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=565&view=rev Author: atani Date: 2008-04-14 09:10:23 -0700 (Mon, 14 Apr 2008) Log Message: ----------- Upgrade to newlib 1.15.0 Modified Paths: -------------- kos/utils/dc-chain/Makefile kos/utils/dc-chain/download.sh kos/utils/dc-chain/unpack.sh Added Paths: ----------- kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff Property Changed: ---------------- kos/utils/dc-chain/ Property changes on: kos/utils/dc-chain ___________________________________________________________________ Name: svn:ignore - logs + logs build* gcc* newlib* binutils* Modified: kos/utils/dc-chain/Makefile =================================================================== --- kos/utils/dc-chain/Makefile 2008-04-04 21:44:27 UTC (rev 564) +++ kos/utils/dc-chain/Makefile 2008-04-14 16:10:23 UTC (rev 565) @@ -22,15 +22,15 @@ # User configuration sh_target=sh-elf arm_target=arm-elf -sh_prefix := /usr/local/dc/$(sh_target) -arm_prefix := /usr/local/dc/$(arm_target) +sh_prefix := /opt/toolchains/dc/$(sh_target) +arm_prefix := /opt/toolchains/dc/$(arm_target) # kos_root: KOS subversion root (contains kos/ and kos-ports/) kos_root=$(CURDIR)/../../.. # kos_base: equivalent of KOS_BASE (contains include/ and kernel/) kos_base=$(kos_root)/kos binutils_ver=2.17 gcc_ver=3.4.6 -newlib_ver=1.12.0 +newlib_ver=1.15.0 gdb_ver=6.7.1 insight_ver=6.7.1 thread_model=posix Modified: kos/utils/dc-chain/download.sh =================================================================== --- kos/utils/dc-chain/download.sh 2008-04-04 21:44:27 UTC (rev 564) +++ kos/utils/dc-chain/download.sh 2008-04-14 16:10:23 UTC (rev 565) @@ -1,5 +1,5 @@ #!/bin/sh wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 || exit 1 wget -c ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 || exit 1 -wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.12.0.tar.gz || exit 1 +wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz || exit 1 Added: kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff =================================================================== --- kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff (rev 0) +++ kos/utils/dc-chain/patches/newlib-1.15.0-kos.diff 2008-04-14 16:10:23 UTC (rev 565) @@ -0,0 +1,504 @@ +diff -ruN newlib-1.15.0/config-ml.in newlib-1.15.0-kos/config-ml.in +--- newlib-1.15.0/config-ml.in 2004-01-04 16:42:16.000000000 -0800 ++++ newlib-1.15.0-kos/config-ml.in 2004-08-07 09:30:51.000000000 -0700 +@@ -196,19 +196,19 @@ + + if [ "${ml_toplevel_p}" = yes ]; then + +-multidirs= +-for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do +- dir=`echo $i | sed -e 's/;.*$//'` +- if [ "${dir}" = "." ]; then +- true +- else +- if [ -z "${multidirs}" ]; then +- multidirs="${dir}" +- else +- multidirs="${multidirs} ${dir}" +- fi +- fi +-done ++multidirs=ml/m4-single-only ++#for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do ++# dir=`echo $i | sed -e 's/;.*$//'` ++# if [ "${dir}" = "." ]; then ++# true ++# else ++# if [ -z "${multidirs}" ]; then ++# multidirs="${dir}" ++# else ++# multidirs="${multidirs} ${dir}" ++# fi ++# fi ++#done + + # Target libraries are configured for the host they run on, so we check + # $host here, not $target. +diff -ruN newlib-1.15.0/newlib/configure.host newlib-1.15.0-kos/newlib/configure.host +--- newlib-1.15.0/newlib/configure.host 2004-02-02 08:59:51.000000000 -0800 ++++ newlib-1.15.0-kos/newlib/configure.host 2004-08-07 10:34:46.000000000 -0700 +@@ -178,6 +178,7 @@ + ;; + sh | sh64) + machine_dir=sh ++ newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DMALLOC_PROVIDED -DABORT_PROVIDED -fno-crossjumping -fno-optimize-sibling-calls" + ;; + sparc*) + machine_dir=sparc +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/ftruncate.c newlib-1.15.0-kos/newlib/libc/sys/sh/ftruncate.c +--- newlib-1.15.0/newlib/libc/sys/sh/ftruncate.c 2003-07-10 08:31:30.000000000 -0700 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/ftruncate.c 2004-08-07 09:40:01.000000000 -0700 +@@ -2,8 +2,8 @@ + #include <sys/types.h> + #include "sys/syscall.h" + +-int ++/* int + ftruncate (int file, off_t length) + { + return __trap34 (SYS_ftruncate, file, length, 0); +-} ++} */ +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/sys/_types.h newlib-1.15.0-kos/newlib/libc/sys/sh/sys/_types.h +--- newlib-1.15.0/newlib/libc/sys/sh/sys/_types.h 1969-12-31 16:00:00.000000000 -0800 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/sys/_types.h 2004-08-07 09:22:27.000000000 -0700 +@@ -0,0 +1,42 @@ ++/* ANSI C namespace clean utility typedefs */ ++ ++/* This file defines various typedefs needed by the system calls that support ++ the C library. Basically, they're just the POSIX versions with an '_' ++ prepended. This file lives in the `sys' directory so targets can provide ++ their own if desired (or they can put target dependant conditionals here). ++*/ ++ ++#ifndef _SYS__TYPES_H ++#define _SYS__TYPES_H ++ ++#include "lock.h" ++ ++typedef long _off_t; ++__extension__ typedef long long _off64_t; ++ ++#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 ++typedef int _ssize_t; ++#else ++typedef long _ssize_t; ++#endif ++ ++#define __need_wint_t ++#include <stddef.h> ++ ++/* Conversion state information. */ ++typedef struct ++{ ++ int __count; ++ union ++ { ++ wint_t __wch; ++ unsigned char __wchb[4]; ++ } __value; /* Value so far. */ ++} _mbstate_t; ++ ++typedef _LOCK_RECURSIVE_T _flock_t; ++ ++/* Iconv descriptor type */ ++typedef void *_iconv_t; ++ ++#endif /* _SYS__TYPES_H */ +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/sys/lock.h newlib-1.15.0-kos/newlib/libc/sys/sh/sys/lock.h +--- newlib-1.15.0/newlib/libc/sys/sh/sys/lock.h 1969-12-31 16:00:00.000000000 -0800 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/sys/lock.h 2004-08-07 10:41:28.000000000 -0700 +@@ -0,0 +1,36 @@ ++#ifndef __SYS_LOCK_H__ ++#define __SYS_LOCK_H__ ++ ++/* Map everything (approximately) to KOS stuff. Note that if the definition ++ of spinlock_t changes size, or the definition of SPINLOCK_INITIALIZER ++ changes, this will also have to be changed. */ ++typedef int _LOCK_T; ++typedef struct { int a, b, c; } _LOCK_RECURSIVE_T; ++ ++#define __LOCK_INIT(class,lock) class _LOCK_T lock = 0; ++#define __LOCK_INIT_RECURSIVE(class,lock) class _LOCK_T lock = { 0, 0, 0 }; ++#define __lock_init(lock) __newlib_lock_init(&(lock)) ++#define __lock_init_recursive(lock) __newlib_lock_init_recursive(&(lock)) ++#define __lock_close(lock) __newlib_lock_close(&(lock)) ++#define __lock_close_recursive(lock) __newlib_lock_close_recursive(&(lock)) ++#define __lock_acquire(lock) __newlib_lock_acquire(&(lock)) ++#define __lock_acquire_recursive(lock) __newlib_lock_acquire_recursive(&(lock)) ++#define __lock_try_acquire(lock) __newlib_lock_try_acquire(&(lock)) ++#define __lock_try_acquire_recursive(lock) __newlib_lock_try_acquire_recursive(&(lock)) ++#define __lock_release(lock) __newlib_lock_release(&(lock)) ++#define __lock_release_recursive(lock) __newlib_lock_release_recursive(&(lock)) ++ ++/* These are defined in KOS */ ++void __newlib_lock_init(_LOCK_T *); ++void __newlib_lock_close(_LOCK_T *); ++void __newlib_lock_acquire(_LOCK_T *); ++void __newlib_lock_try_acquire(_LOCK_T *); ++void __newlib_lock_release(_LOCK_T *); ++ ++void __newlib_lock_init_recursive(_LOCK_RECURSIVE_T *); ++void __newlib_lock_close_recursive(_LOCK_RECURSIVE_T *); ++void __newlib_lock_acquire_recursive(_LOCK_RECURSIVE_T *); ++void __newlib_lock_try_acquire_recursive(_LOCK_RECURSIVE_T *); ++void __newlib_lock_release_recursive(_LOCK_RECURSIVE_T *); ++ ++#endif /* __SYS_LOCK_H__ */ +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/syscalls.c newlib-1.15.0-kos/newlib/libc/sys/sh/syscalls.c +--- newlib-1.15.0/newlib/libc/sys/sh/syscalls.c 2001-02-01 13:25:56.000000000 -0800 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/syscalls.c 2004-08-07 10:24:07.000000000 -0700 +@@ -1,221 +1,2 @@ +-#include <_ansi.h> +-#include <sys/types.h> +-#include <sys/stat.h> +-#include <sys/time.h> +-#include "sys/syscall.h" +-int errno; +- +-/* This is used by _sbrk. */ +-register char *stack_ptr asm ("r15"); +- +-int +-_read (int file, +- char *ptr, +- int len) +-{ +- return __trap34 (SYS_read, file, ptr, len); +-} +- +-int +-_lseek (int file, +- int ptr, +- int dir) +-{ +- return __trap34 (SYS_lseek, file, ptr, dir); +-} +- +-int +-_write ( int file, +- char *ptr, +- int len) +-{ +- return __trap34 (SYS_write, file, ptr, len); +-} +- +-int +-_close (int file) +-{ +- return __trap34 (SYS_close, file, 0, 0); +-} +- +-int +-_link (char *old, char *new) +-{ +- return -1; +-} +- +-caddr_t +-_sbrk (int incr) +-{ +- extern char end; /* Defined by the linker */ +- static char *heap_end; +- char *prev_heap_end; +- +- if (heap_end == 0) +- { +- heap_end = &end; +- } +- prev_heap_end = heap_end; +- if (heap_end + incr > stack_ptr) +- { +- _write (1, "Heap and stack collision\n", 25); +- abort (); +- } +- heap_end += incr; +- return (caddr_t) prev_heap_end; +-} +- +-int +-_fstat (int file, +- struct stat *st) +-{ +- st->st_mode = S_IFCHR; +- return 0; +-} +- +-int +-_open (const char *path, +- int flags) +-{ +- return __trap34 (SYS_open, path, flags, 0); +-} +- +-int +-_creat (const char *path, +- int mode) +-{ +- return __trap34 (SYS_creat, path, mode, 0); +-} +- +-int +-_unlink () +-{ +- return -1; +-} +- +-isatty (fd) +- int fd; +-{ +- return 1; +-} +- +-_exit (n) +-{ +- return __trap34 (SYS_exit, n, 0, 0); +-} +- +-_kill (n, m) +-{ +- return __trap34 (SYS_exit, 0xdead, 0, 0); +-} +- +-_getpid (n) +-{ +- return 1; +-} +- +-_raise () +-{ +-} +- +-int +-_stat (const char *path, struct stat *st) +- +-{ +- return __trap34 (SYS_stat, path, st, 0); +-} +- +-int +-_chmod (const char *path, short mode) +-{ +- return __trap34 (SYS_chmod, path, mode); +-} +- +-int +-_chown (const char *path, short owner, short group) +-{ +- return __trap34 (SYS_chown, path, owner, group); +-} +- +-int +-_utime (path, times) +- const char *path; +- char *times; +-{ +- return __trap34 (SYS_utime, path, times); +-} +- +-int +-_fork () +-{ +- return __trap34 (SYS_fork); +-} +- +-int +-_wait (statusp) +- int *statusp; +-{ +- return __trap34 (SYS_wait); +-} +- +-int +-_execve (const char *path, char *const argv[], char *const envp[]) +-{ +- return __trap34 (SYS_execve, path, argv, envp); +-} +- +-int +-_execv (const char *path, char *const argv[]) +-{ +- return __trap34 (SYS_execv, path, argv); +-} +- +-int +-_pipe (int *fd) +-{ +- return __trap34 (SYS_pipe, fd); +-} +- +-/* This is only provided because _gettimeofday_r and _times_r are +- defined in the same module, so we avoid a link error. */ +-clock_t +-_times (struct tms *tp) +-{ +- return -1; +-} +- +-int +-_gettimeofday (struct timeval *tv, struct timezone *tz) +-{ +- tv->tv_usec = 0; +- tv->tv_sec = __trap34 (SYS_time); +- return 0; +-} +- +-static inline int +-__setup_argv_for_main (int argc) +-{ +- char **argv; +- int i = argc; +- +- argv = __builtin_alloca ((1 + argc) * sizeof (*argv)); +- +- argv[i] = NULL; +- while (i--) { +- argv[i] = __builtin_alloca (1 + __trap34 (SYS_argnlen, i)); +- __trap34 (SYS_argn, i, argv[i]); +- } +- +- return main (argc, argv); +-} +- +-int +-__setup_argv_and_call_main () +-{ +- int argc = __trap34 (SYS_argc); +- +- if (argc <= 0) +- return main (argc, NULL); +- else +- return __setup_argv_for_main (argc); +-} ++// This is put in here to cause link errors if a proper newlib isn't present. ++int __newlib_kos_patch = 1; +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/trap.S newlib-1.15.0-kos/newlib/libc/sys/sh/trap.S +--- newlib-1.15.0/newlib/libc/sys/sh/trap.S 2002-02-07 23:11:13.000000000 -0800 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/trap.S 2004-08-07 09:39:14.000000000 -0700 +@@ -1,43 +0,0 @@ +-#if __SH5__ +- .mode SHmedia +-#if __SH5__ == 32 && __SHMEDIA__ +- .section .text..SHmedia32, "ax" +-#else +- .text +-#endif +- .global ___trap34 +-___trap34: +- movi 34, r0 +- trapa r0 +- pt/l ret, tr1 +- ptabs/l r18, tr0 +- beqi r1, 0, tr1 +-#if __SH5__ == 64 +- movi ((_errno >> 48) & 65535), r0 +- shori ((_errno >> 32) & 65535), r0 +- shori ((_errno >> 16) & 65535), r0 +-#else +- movi ((_errno >> 16) & 65535), r0 +-#endif +- shori (_errno & 65535), r0 +- stx.l r0, r63, r1 +-ret: +- blink tr0, r63 +- +-#else +- .text +- .global ___trap34 +-___trap34: +- trapa #34 +- tst r1,r1 ! r1 is errno +- bt ret +- mov.l perrno,r2 +- mov.l r1,@r2 +-ret: +- rts +- nop +- +- .align 2 +-perrno: +- .long _errno +-#endif /* ! __SH5__ */ +diff -ruN newlib-1.15.0/newlib/libc/sys/sh/truncate.c newlib-1.15.0-kos/newlib/libc/sys/sh/truncate.c +--- newlib-1.15.0/newlib/libc/sys/sh/truncate.c 2003-07-10 08:31:30.000000000 -0700 ++++ newlib-1.15.0-kos/newlib/libc/sys/sh/truncate.c 2004-08-07 09:39:55.000000000 -0700 +@@ -2,8 +2,8 @@ + #include <sys/types.h> + #include "sys/syscall.h" + +-int ++/* int + truncate (const char *path, off_t length) + { + return __trap34 (SYS_truncate, path, length, 0); +-} ++} */ +diff -ruN newlib-1.15.0/newlib/libc/include/sys/types.h newlib-1.15.0-kos/newlib/libc/include/sys/types.h +--- newlib-1.15.0/newlib/libc/include/sys/types.h 2006-09-13 15:09:27.000000000 -0700 ++++ newlib-1.15.0-kos/newlib/libc/include/sys/types.h 2007-08-27 10:39:04.804359158 -0700 +@@ -280,7 +280,9 @@ + * 2.5 Primitive System Data Types, P1003.1c/D10, p. 19. + */ + ++#ifndef _arch_dreamcast + typedef __uint32_t pthread_t; /* identify a thread */ ++#endif + + /* P1003.1c/D10, p. 118-119 */ + #define PTHREAD_SCOPE_PROCESS 0 +@@ -296,6 +298,7 @@ + #define PTHREAD_CREATE_DETACHED 0 + #define PTHREAD_CREATE_JOINABLE 1 + ++#ifndef _arch_dreamcast + typedef struct { + int is_initialized; + void *stackaddr; +@@ -312,6 +315,7 @@ + int detachstate; + + } pthread_attr_t; ++#endif + + #if defined(_POSIX_THREAD_PROCESS_SHARED) + /* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */ +@@ -332,6 +336,7 @@ + #define PTHREAD_PRIO_PROTECT 2 + #endif + ++#ifndef _arch_dreamcast + typedef __uint32_t pthread_mutex_t; /* identify a mutex */ + + typedef struct { +@@ -345,9 +350,11 @@ + #endif + int recursive; + } pthread_mutexattr_t; ++#endif + + /* Condition Variables */ + ++#ifndef _arch_dreamcast + typedef __uint32_t pthread_cond_t; /* identify a condition variable */ + + typedef struct { +@@ -356,15 +363,18 @@ + int process_shared; /* allow this to be shared amongst processes */ + #endif + } pthread_condattr_t; /* a condition attribute object */ ++#endif + + /* Keys */ + ++#ifndef _arch_dreamcast + typedef __uint32_t pthread_key_t; /* thread-specific data keys */ + + typedef struct { + int is_initialized; /* is this structure initialized? */ + int init_executed; /* has the initialization routine been run? */ + } pthread_once_t; /* dynamic package initialization */ ++#endif + #else + #if defined (__CYGWIN__) + #include <cygwin/types.h> + Modified: kos/utils/dc-chain/unpack.sh =================================================================== --- kos/utils/dc-chain/unpack.sh 2008-04-04 21:44:27 UTC (rev 564) +++ kos/utils/dc-chain/unpack.sh 2008-04-14 16:10:23 UTC (rev 565) @@ -1,7 +1,7 @@ #!/bin/sh -rm -rf binutils-2.17 gcc-3.4.6 newlib-1.12.0 +rm -rf binutils-2.17 gcc-3.4.6 newlib-1.15.0 tar jxf binutils-2.17.tar.bz2 || exit 1 tar jxf gcc-3.4.6.tar.bz2 || exit 1 -tar zxf newlib-1.12.0.tar.gz || exit 1 +tar zxf newlib-1.15.0.tar.gz || exit 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |