Merge branch 'master' into mcb-tcp-xfer

This commit is contained in:
Michael Brown
2007-06-08 16:33:24 +01:00
27 changed files with 790 additions and 1044 deletions

View File

@@ -388,7 +388,7 @@ int net_rx ( struct io_buffer *iobuf, struct net_device *netdev,
* This polls all interfaces for received packets, and processes
* packets from the RX queue.
*/
static void net_step ( struct process *process ) {
static void net_step ( struct process *process __unused ) {
struct net_device *netdev;
struct io_buffer *iobuf;
@@ -410,9 +410,6 @@ static void net_step ( struct process *process ) {
netdev->ll_protocol->rx ( iobuf, netdev );
}
}
/* Re-schedule ourself */
schedule ( process );
}
/** Networking stack process */
@@ -422,7 +419,7 @@ static struct process net_process = {
/** Initialise the networking stack process */
static void init_net ( void ) {
schedule ( &net_process );
process_add ( &net_process );
}
INIT_FN ( INIT_PROCESS, init_net, NULL, NULL );

View File

@@ -64,7 +64,7 @@ static LIST_HEAD ( timers );
* be stopped and the timer's callback function will be called.
*/
void start_timer ( struct retry_timer *timer ) {
if ( ! timer->start )
if ( ! timer_running ( timer ) )
list_add ( &timer->list, &timers );
timer->start = currticks();
if ( timer->timeout < MIN_TIMEOUT )
@@ -86,7 +86,7 @@ void stop_timer ( struct retry_timer *timer ) {
unsigned long runtime;
/* If timer was already stopped, do nothing */
if ( ! timer->start )
if ( ! timer_running ( timer ) )
return;
list_del ( &timer->list );
@@ -153,7 +153,7 @@ static void timer_expired ( struct retry_timer *timer ) {
*
* @v process Retry timer process
*/
static void retry_step ( struct process *process ) {
static void retry_step ( struct process *process __unused ) {
struct retry_timer *timer;
struct retry_timer *tmp;
unsigned long now = currticks();
@@ -164,8 +164,6 @@ static void retry_step ( struct process *process ) {
if ( used >= timer->timeout )
timer_expired ( timer );
}
schedule ( process );
}
/** Retry timer process */
@@ -175,7 +173,7 @@ static struct process retry_process = {
/** Initialise the retry timer module */
static void init_retry ( void ) {
schedule ( &retry_process );
process_add ( &retry_process );
}
INIT_FN ( INIT_PROCESS, init_retry, NULL, NULL );

View File

@@ -23,6 +23,7 @@
#include <errno.h>
#include <assert.h>
#include <byteswap.h>
#include <gpxe/vsprintf.h>
#include <gpxe/scsi.h>
#include <gpxe/process.h>
#include <gpxe/uaccess.h>
@@ -348,32 +349,6 @@ static void iscsi_tx_data_out ( struct iscsi_session *iscsi,
*
*/
/**
* Version of snprintf() that accepts a signed buffer size
*
* @v buf Buffer into which to write the string
* @v size Size of buffer
* @v fmt Format string
* @v args Arguments corresponding to the format string
* @ret len Length of formatted string
*
* This is a utility function for iscsi_build_login_request_strings().
*/
static int ssnprintf ( char *buf, ssize_t ssize, const char *fmt, ... ) {
va_list args;
int len;
/* Treat negative buffer size as zero buffer size */
if ( ssize < 0 )
ssize = 0;
/* Hand off to vsnprintf */
va_start ( args, fmt );
len = vsnprintf ( buf, ssize, fmt, args );
va_end ( args );
return len;
}
/**
* Build iSCSI login request strings
*