• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Revision505b5eb0502e7ee520285094a0b156b847a20158 (tree)
Zeit2018-03-03 08:29:15
Autortakemasa <suikan@user...>
Commitertakemasa

Log Message

Change DebuggerFifo definition. the Put member funciton must not be
protected by the critical secition, because the call wee will wrap its
sprintf() and Put() inside one critical section. In other hand, Notifing
to the other thak have to be done outside of the critical section.

Ändern Zusammenfassung

Diff

--- a/stm32_development/murasaki/murasaki/debuggerfifo.cpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.cpp
@@ -34,19 +34,11 @@ DebuggerFifo::~DebuggerFifo()
3434 delete sync_;
3535 }
3636
37-unsigned int DebuggerFifo::Put(const uint8_t data[], unsigned int size)
37+void DebuggerFifo::NotifyData()
3838 {
39- unsigned int ret_val;
40-
41- portDISABLE_INTERRUPTS();
42- {
43- ret_val = inherited::Put(data, size);
44- }
45- portENABLE_INTERRUPTS();
4639
4740 sync_->ReleaseTask();
4841
49- return ret_val;
5042 }
5143
5244 unsigned int DebuggerFifo::Get(uint8_t data[], unsigned int size)
--- a/stm32_development/murasaki/murasaki/debuggerfifo.hpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.hpp
@@ -50,12 +50,9 @@ class DebuggerFifo : public AbstractFifo
5050 */
5151 virtual ~DebuggerFifo();
5252 /**
53- * @brief Put the data into the internal buffer.This is thread safe. Task/ISR bimodal.
54- * @param data Data to be copied to the internal buffer
55- * @param size Data count to be copied
56- * @return The count of copied data. 0, if the internal buffer is full.
53+ * @brief Notyify new data is in the buffer, to the receiver task.
5754 */
58- virtual unsigned int Put(uint8_t const data[], unsigned int size);
55+ virtual void NotifyData();
5956 /**
6057 * @brief Get the data from the internal buffer. This is thread safe function. Do not call from ISR.
6158 * @param data Data buffer to receive from the internal buffer