Merged nuttx/nuttx into master

This commit is contained in:
ziggurat29 2016-04-25 09:38:22 -05:00
commit cb15ec1d9b
4 changed files with 76 additions and 23 deletions

View File

@ -680,7 +680,10 @@
<td><br></td>
<td>
<p>
<li>Graphics: framebuffer drivers, graphic- and segment-LCD drivers.</li>
<li>
Graphics: framebuffer drivers, graphic- and segment-LCD drivers.
VNC server.
</li>
</p>
</td>
</tr>
@ -831,7 +834,8 @@
<td>
<p>
<li>Networking utilities (DHCP server and client, SMTP client, TELNET client, FTP server and client, TFTP client, HTTP server and client, PPPD, NTP client).
Inheritable TELNET sessions (as &quot;controlling terminal&quot;)</li>
Inheritable TELNET sessions (as &quot;controlling terminal&quot;).
VNC server.</li>
</p>
</td>
</tr>

View File

@ -833,14 +833,29 @@ Re-building
a file in one of the linked (i.e., copied) directories, re-build NuttX,
and then not see your changes when you run the program. That is because
build is still using the version of the file in the copied directory, not
your modified file! To work around this annoying behavior, do the
following when you re-build:
your modified file!
Older versions of NuttX did not support dependiencies in this
configuration. So a simple work around this annoying behavior in this
case was the following when you re-build:
make clean_context all
This 'make' command will remove of the copied directories, re-copy them,
then make NuttX.
However, more recent versions of NuttX do support dependencies for the
Cygwin build. As a result, the above command will cause everything to be
rebuilt (beause it removes and will cause recreating the
include/nuttx/config.h header file). A much less gracefully but still
effective command in this case is the following for the ARM configuration:
rm -rf arch/arm/src/chip arch/arm/src/board
This "kludge" simple removes the copied directories. These directories
will be re-created when you do a normal 'make' and your edits will then be
effective.
Build Targets and Options
-------------------------

View File

@ -2498,9 +2498,13 @@ Configuration sub-directories
2106-04-23: Configuration created. See status up to this data in
the vnc configuration. That probably all applies here as well.
Only some initial testing has been performed: The configuration
does not work. The NuttX VNC server is crashing because of this
assertion:
Only some initial testing has been performed: The configuration
is partially functional. Menus do appear and mouse input is
probably working correctly.
But there are a lot of instabilities. I see assertions of
various kinds and the RealVNC client often crashes as well.
Some of the assertions I see are:
while (sem_wait(&session->queuesem) < 0)
...
@ -2510,4 +2514,5 @@ Configuration sub-directories
I would think that could mean only that the semaphore counting is
out of sync with the number of updates in the queue.
But also the assertion at devif/devif_iobsend.c line: 102 which
probably means some kind of memory corruption.

View File

@ -64,7 +64,8 @@
* Pre-processor Definitions
****************************************************************************/
#undef VNCSERVER_SEM_DEBUG
#undef VNCSERVER_SEM_DEBUG /* Define to dump queue/semaphore state */
#undef VNCSERVER_SEM_DEBUG_SILENT /* Define to dump only suspicious conditions */
/****************************************************************************
* Private Data
@ -112,8 +113,14 @@ static void vnc_sem_debug(FAR struct vnc_session_s *session,
FAR const char *msg, unsigned int unattached)
{
FAR struct vnc_fbupdate_s *update;
unsigned int nqueued;
unsigned int nfree;
int nqueued;
int nfree;
int freesem;
int queuesem;
int freecount;
int queuecount;
int freewaiting;
int queuewaiting;
while (sem_wait(&g_dbgsem) < 0)
{
@ -122,19 +129,40 @@ static void vnc_sem_debug(FAR struct vnc_session_s *session,
/* Count structures in the list */
for (nqueued = 0, update = (FAR struct vnc_fbupdate_s *)session->updqueue.head;
update != NULL;
nqueued++, update = update->flink);
nqueued = sq_count(&session->updqueue);
nfree = sq_count(&session->updfree);
for (nfree = 0, update = (FAR struct vnc_fbupdate_s *)session->updfree.head;
update != NULL;
nfree++, update = update->flink);
freesem = session->freesem.semcount;
queuesem = session->queuesem.semcount;
syslog(LOG_INFO, "FREESEM DEBUG: %s\n", msg);
syslog(LOG_INFO, " freesem: %d\n", session->freesem.semcount);
syslog(LOG_INFO, " queued: %u\n", nqueued);
syslog(LOG_INFO, " free: %u\n", nfree);
syslog(LOG_INFO, " unattached: %u\n", unattached);
freecount = freesem > 0 ? freesem : 0;
queuecount = queuesem > 0 ? queuesem : 0;
freewaiting = freesem < 0 ? -freesem : 0;
queuewaiting = queuesem < 0 ? -queuesem : 0;
#ifdef VNCSERVER_SEM_DEBUG_SILENT
/* This dumps most false alarms in the case where:
*
* - Updater was waiting on a semaphore (count is -1)
* - New update added to the queue (queue count is 1)
* - queuesem posted. Wakes up Updater and the count is 0.
*/
if ((nqueued + nfree) != (freecount + queuecount))
#endif
{
syslog(LOG_INFO, "FREESEM DEBUG: %s\n", msg);
syslog(LOG_INFO, " Free list:\n");
syslog(LOG_INFO, " semcount: %d\n", freecount);
syslog(LOG_INFO, " queued nodes: %u\n", nfree);
syslog(LOG_INFO, " waiting: %u\n", freewaiting);
syslog(LOG_INFO, " Qeued Updates:\n");
syslog(LOG_INFO, " semcount: %d\n", queuecount);
syslog(LOG_INFO, " queued nodes: %u\n", nqueued);
syslog(LOG_INFO, " waiting: %u\n", queuewaiting);
syslog(LOG_INFO, " Unqueued: %u\n", unattached);
}
sem_post(&g_dbgsem);
}
@ -262,6 +290,8 @@ vnc_remove_queue(FAR struct vnc_session_s *session)
/* It is reserved.. go get it */
rect = (FAR struct vnc_fbupdate_s *)sq_remfirst(&session->updqueue);
vnc_sem_debug(session, "After remove", 0);
DEBUGASSERT(rect != NULL);
/* Check if we just removed the whole screen update from the queue */
@ -272,7 +302,6 @@ vnc_remove_queue(FAR struct vnc_session_s *session)
updvdbg("Whole screen update: nwhupd=%d\n", session->nwhupd);
}
vnc_sem_debug(session, "After remove", 0);
sched_unlock();
return rect;
}