Esempio n. 1
0
        /// <summary>
        /// Called from VideoEngine </summary>
        public virtual void hleGeListSyncDone(PspGeList list)
        {
            //if (log.DebugEnabled)
            {
                string msg = "hleGeListSyncDone list " + list;

                if (list.Done)
                {
                    msg += ", done";
                }
                else
                {
                    msg += ", NOT done";
                }

                if (list.blockedThreadIds.Count > 0 && list.status != PSP_GE_LIST_END_REACHED)
                {
                    msg += ", waking thread";
                    foreach (int threadId in list.blockedThreadIds)
                    {
                        msg += " " + threadId.ToString("x");
                    }
                }

                Console.WriteLine(msg);
            }

            lock (this)
            {
                if (list.blockedThreadIds.Count > 0 && list.status != PSP_GE_LIST_END_REACHED)
                {
                    // things might go wrong if the thread already exists in the queue
                    deferredThreadWakeupQueue.addAll(list.blockedThreadIds);
                }

                if (list.Done)
                {
                    listFreeQueue.add(list);
                }
            }
        }